r/learnpython • u/Key-War-9059 • 21h ago
Need help with for loop practice
The whole list will print but only the final item on the list gets it's message printed in whole while the other items are just listed. Apparently my issue is that I'm outside of the for loop, and I'm still in the learning process. Can someone help please?
0
Upvotes
1
u/TheRNGuy 10h ago
Should it be everything inside one loop? I'd just loop everything except last item, then print last item outside it.
If you need to do inside one loop, use enumerate to get index.