Open In App
Related Articles

Python-Quizzes | Python Tuples Quiz | Question 1

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
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