Q. What will be the output of the following code?

Code:
x = "abcd"

for i in range(len(x)):

    print(i)
  • (A) abcd
  • (B) 0 1 2 3
  • (C) 1 2 3 4
  • (D) a b c d
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0 1 2 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
311
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
95%
Success Rate