Q. What will be the output of the following Python code snippet?
Code:
x = 'abcd'
for i in range(len(x)):
x = 'a'
print(x)
β
Correct Answer: (B)
a a a a
x = 'abcd'
for i in range(len(x)):
x = 'a'
print(x)
You must be Logged in to update hint/solution