CBSE Class 11 Computer Science Question 44 of 88

Tuples and Dictionary — Question 9

Back to all questions
9
Question

Question 9

Write a Python program to create a tuple with different data types and display.

Answer
t = tuple((42, "Hello, World!", 3.14, True, [1, 2, 3]))
print(t)
Output
(42, 'Hello, World!', 3.14, True, [1, 2, 3])