Write a program that inputs two tuples and creates a third, that contains all elements of the first

Опубликовано: 12 Октябрь 2024
на канале: Portal Express
476
8

Q. Write a program that inputs two tuples and creates a third, that contains all elements of the first followed by all elements of the second.

Answer =

tup1 = eval(input("Enter Frist tuple :-"))
tup2 = eval(input("Enter second tuple :-"))
tup3 = tup1 + tup2
print(tup3)

Out Put :-

Enter Frist tuple :-(1,2,3,4,5)
Enter second tuple :-(6,7,8,9)
(1, 2, 3, 4, 5, 6, 7, 8, 9)

Enter Frist tuple :-("Path","Walla")
Enter second tuple :-("Portal","Express")
('Path', 'Walla', 'Portal', 'Express')