Concatenation of Tuples in Python

Published on Mar 16, 2022

Examples of concatenation of tuple:

Method 1

tup1 = (1, 2, 3)
tup2 = (4, 5, 6)

res = tup1 + tup2

print("Result is : " + str(res))
Method 2

tup1 = (1, 2, 3)
tup2 = (4, 5, 6)

res = sum((tup1, tup2), ())

print("Result is : " + str(res))