Computer Science

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

Python Tuples

3 Likes

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

Answered By

1 Like


Related Questions