Open In App

Python-Quizzes | Python Tuples Quiz | Question 1

Like Article
Like
Save
Share
Report

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


Last Updated : 18 Sep, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads