CBSE Class 11 Computer Science Question 26 of 114

Tuples — Question 3

Back to all questions
3
Question

Question 3

Choose the correct statement(s).

  1. In Python, a tuple can contain only integers as its elements.
  2. In Python, a tuple can contain only strings as its elements.
  3. In Python, a tuple can contain elements of different types.
  4. In Python, a tuple can contain either string or integer but not both at a time
Answer

In Python, a tuple can contain elements of different types.

Reason — A tuple can have any number of items and they may be of different types (integer, float, list, string, etc).