What will be the output of the following Python code? x = ‘abcd’ for i in range(len(x)): print(i)

Questions & AnswersCategory: Programming LanguageWhat will be the output of the following Python code? x = ‘abcd’ for i in range(len(x)): print(i)
Geek Boy Staff asked 2 years ago

What will be the output of the following Python code?

x = 'abcd'
for i in range(len(x)):
    print(i)

a. error
b. 1 2 3 4
c. a b c d
d. 0 1 2 3