Open In App

Python-Quizzes | Python Tuples Quiz | Question 1

Question 1: What is the output of the following program?




tuple = (1, 2, 3, 4
tuple.append( (5, 6, 7) ) 
print(len(my_tuple)) 

(A) 1
(B) 2
(C) 5
(D) Error

Answer: (D)
Explanation: In this case, an exception will be thrown as tuples are immutable and don’t have an append method.
Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :