CBSE Class 11 Computer Science Question 29 of 114

Tuples — Question 6

Back to all questions
6
Question

Question 6

What will be the output of following Python code?

tp1 = (2,4,3)  
tp3 = tp1*2   
print(tp3)
  1. (4,8,6)
  2. (2,4,3,2,4,3)
  3. (2,2,4,4,3,3)
  4. Error
Answer

(2,4,3,2,4,3)

Reason — The "*" operator repeats a tuple specified number of times and creates a new tuple.