CBSE Class 11 Computer Science Question 24 of 114

Tuples — Question 1

Back to all questions
1
Question

Question 1

Which of the following statements will create a tuple:

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

tp1=("a", "b")

Reason — A tuple is created by placing all the items (elements) inside parentheses () , separated by commas.