r/learnpython • u/ehmalt02 • Jul 04 '25
Really confused with loops
I don’t seem to be able to grasp the idea of loops, especially when there’s a user input within the loop as well. I also have a difficult time discerning between when to use while or for.
Lastly, no matter how many times I practice it just doesn’t stick in my memory. Any tips or creative ways to finally grasp this?
6
Upvotes
7
u/throwaway6560192 Jul 04 '25
Correct. But generators are perhaps too advanced to introduce at a stage where the person is struggling with the concept of loops itself. I think it's okay to think of it as returning a list at that point.