Concatenation of Tuples in Python
Mar 16, 2022 · Snippet · 1 min, 94 words
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))
Share on Social Media

Comments
No comments yet…