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

What will be the output of the following Python code?
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’,)
 

Tìm kiếm

Back
Top