CBSE Class 11 Computer Science Question 41 of 88

Tuples and Dictionary — Question 6

Back to all questions
6
Question

Question 6

Can we always have same type of values in a tuple? State True or False with justification.

Answer

False, we can have different type of values in a tuple. A tuple can hold values of different data types, i.e., a tuple is heterogeneous in nature.

For example: T1 = (1, 'apple', [2, 3]).