Write Python3 code to demonstrate working of Concatenating tuples to nested tuples Using ", " operator during concatenation
Topic: Write Python3 code to demonstrate working of Concatenating tuples to nested tuples Using ", " operator during concatenation
Solution
test_tup1 = (3, 4) test_tup2 = (5, 6) print("The original tuple 1 : " + str(test_tup1)) print("The original tuple 2 : " + str(test_tup2)) res = ((test_tup1, ) + (test_tup2, )) print("Tuples after Concatenating : " + str(res))
List all Python Programs