This program concatenates two tuples.
Note that tuples are immutable in Python, which means that their elements cannot be changed once the tuple is created. Concatenating two tuples creates a new tuple that contains all the elements of both original tuples.
tup1 = (18 , 23 , 2 , 9), tup2 = (10 , 3 , 11), print("Tuple 1 : ",tup1) print("Tuple 2 : ",tup2) res = tup1 + tup2 print("Tuples after Concatenating : ",res)
Tuple 1 : ((18, 23, 2, 9),) Tuple 2 : ((10, 3, 11),) Tuples after Concatenating : ((18, 23, 2, 9), (10, 3, 11))
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions