Python | for loop quiz | Question 23

Last Updated :
Discuss
Comments

What will the following code output?

numbers = [3, 7, 2, 8, 5]
for i, num in enumerate(numbers):
   if i == num:
       break
   print(num, end=' ')
 

3 7 2 8 5

3 7

3 7 2

7 2 8

Share your thoughts in the comments