CBSE Class 11 Computer Science Question 13 of 114

Tuples — Question 13

Back to all questions
13
Question

Question 13

Can you have an integer, a string, a tuple of integers and a tuple of strings in a tuple?

Answer

Yes, it is possible to have an integer, a string, a tuple of integers and a tuple of strings in a tuple because tuples can store elements of all data types.

For example:
tup = (1, 'python', (2, 3), ('a', 'b'))