bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Python/Foundations
Python•Foundations

Python - Join Tuples

Join Two Tuples

To join two or more tuples you can use the + operator:

Example

tuple1 = ("a", "b" , "c")
tuple2 = (1, 2, 3)

tuple3 = tuple1 + tuple2

print(tuple3)

Multiply Tuples

If you want to multiply the content of a tuple a given number of times, you can use the * operator:

Example

fruits = ("apple", "banana", "cherry")
mytuple = fruits * 2

print(mytuple)

Previous

Python - Loop Tuples

Next

Python - Tuple Methods