Python-Quizzes | Python Tuples Quiz | Question 10

Last Updated :
Discuss
Comments

What is the output of the following program?

Python
import sys 
tup = tuple() 
print(sys.getsizeof(tup), end = " ") 
tup = (1, 2) 
print(sys.getsizeof(tup), end = " ") 
tup = (1, 3, (4, 5)) 
print(sys.getsizeof(tup), end = " ") 
tup = (1, 2, 3, 4, 5, [3, 4], 'p', '8', 9.777, (1, 3)) 
print(sys.getsizeof(tup)) 

0 2 3 10

32 34 35 42

48 64 72 128

48 144 192 480

Share your thoughts in the comments