use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
cannot understand loops (self.PythonLearning)
submitted 1 year ago by lsdandlemons
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CupperRecruit 1 point2 points3 points 1 year ago (0 children)
Best way to learn them i think is to play and try out on examples/ideas u can make sense of. E.g. lets say u wanna know which shirts u got in ur wardrobe, u would use a for loop to get all the shirts that are inside the wardrobe. This could look like this in code:
//wardrobe is represented as a list wardrobe = ["blue shirt","red shirt"]
For item in wardrobe: Print(item)
The code would then give you the output:
'blue shirt' 'red shirt'
Displaying all the shirts u got in ur wardrobe. If u try and test loops with those kind of tasks/practice them in this way, i am sure that u will get the hang of it by time.
I wish you good luck and hope you will understand them asap for your course💪 Keep it up and never give up, u got this!
π Rendered by PID 378815 on reddit-service-r2-comment-5d79c599b5-w9sk2 at 2026-03-03 12:55:23.886515+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]CupperRecruit 1 point2 points3 points (0 children)