KnowledgeBoat Logo
|

Computer Science

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

Python Tuples

1 Like

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]).

Answered By

1 Like


Related Questions