Ask coding questions

← Back to all posts
Why is it repeating the contents 2 times
ROCKINGRAYQUAZA (94)

I just want the content of the list to be printed one time with their serial number but i don't know why the program is doing like this??

Answered by PattanAhmed (1417) [earned 5 cycles]
View Answer
Comments
hotnewtop
PattanAhmed (1417)

@ROCKINGRAYQUAZA Hi,
You haven't exited the code, Just add break at the first for loop and you are done...
Code:-

Thanks!

Hope this helps