Examveda

What will be the output of the following Python code?
a = ('check',)
n = 2
for i in range(int(n)):
    a = (a,)
    print(a)

A. Error, tuples are immutable

B. (('check',),)
((('check',),),)

C. ((‘check’,)’check’,)

D. (('check',)’check’,)
((('check',)’check’,)’check’,)

Answer: Option B


This Question Belongs to Python Program >> Tuples In Python

Join The Discussion

Related Questions on Tuples in Python