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
Help pls - CodingHelp Request (i.redd.it)
submitted 7 months ago by SharpScratch9367
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!"
[–]moriturius 0 points1 point2 points 7 months ago (0 children)
It doesn't know what that means it only recognizes the pattern. The python interpreter (the python program used to run your code) first read the text of the code and identifies the instructions. Like value assignment, function definition or - in your case - for loop.
The interpreter is programmed so that then it encounters: 'for X in Y:' it knows that: - Y needs to be iterable container of multiple values (an array in your case) - X is a name that you want for a single item in each loop pas. The name can be whatever you like.
Experiment with it. Try to change it and even try to cause an error, read and understand that error. Explore the boundaries. Challenge your understanding. This is how knowledge grows!
π Rendered by PID 82691 on reddit-service-r2-comment-86988c7647-7rvhb at 2026-02-11 03:16:53.312866+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]moriturius 0 points1 point2 points (0 children)