Computer Science

Which of the following creates a tuple?

  1. t1 = ("a", "b")
  2. t1 [2]= ("a", "b")
  3. t1= (5) *2
  4. None of these

Python Tuples

3 Likes

Answer

t1 = ("a", "b")

Reason — The statement t1 = ("a", "b") creates a tuple with two elements: "a" and "b".

Answered By

3 Likes


Related Questions