What will be the output of the following Python code? [code] a=[[]]*3 a[1].append(7) print(a) [/code]

KellyPoima

New member
What will be the output of the following Python code?
Code:
a=[[]]*3
a[1].append(7)
print(a)
A. Syntax error
B. [[7], [7], [7]]
C. [[7], [], []]
D. [[],7, [], []]
 

Tìm kiếm

Back
Top