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 = ('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
Join The Discussion