πŸ“Š Python
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)
  • (A) a
  • (B) a a a a
  • (C) abcd abcd abcd
  • (D) none
πŸ’¬ Discuss
βœ… Correct Answer: (B) a a a a

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
161
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Vaibhav Shukla
Publisher
πŸ“ˆ
99%
Success Rate