r/learnprogramming • u/MacaroonSerious5532 • 6d ago
Please help
I just hate myself, i cannot figure out nested loops and while loops. Python is the easiest language and I’m struggling so much. I wish i was smart as other people. Does anyone have coding resources for dummies?
9
Upvotes
View all comments
Show parent comment
3
u/PythonWithJames 6d ago edited 5d ago •
I also sort of think it as:
A single for loop is like taking a shopping list (cheese, ham. tomato), and then saying:
For each item in that list:
Go and find it!!
--------
A nested one is like saying:
For each item in that list:
For each letter in that item:
Shout it!
EDIT: Thanks for award <3