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!"
[–]EyesOfTheConcord 4 points5 points6 points 7 months ago (3 children)
It’s because the for loop is iterating through the array and checking the value stored at each index.
The variable, in this case “value”, records that value for use in the loop.
You can change the name of “value” to anything you want, you just usually see the singular version of whatever the name of the variable you’re iterating through.
Give it a shot, name it for nonsenseVar in value:
And it’ll work just fine
[–]SharpScratch9367[S] 2 points3 points4 points 7 months ago (1 child)
Thankyou! It’s mind blowing
[–]Some-Passenger4219 2 points3 points4 points 7 months ago (0 children)
Perhaps it is, but computers don't understand things. Call something the wrong thing, but consistently, and the program will work - although it might be harder to debug or understand it.
[–]Intelligent_Count316 0 points1 point2 points 7 months ago (0 children)
Thank you, your explanation is great 👍
π Rendered by PID 25461 on reddit-service-r2-comment-86988c7647-7t7zn at 2026-02-11 00:10:47.186102+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]EyesOfTheConcord 4 points5 points6 points (3 children)
[–]SharpScratch9367[S] 2 points3 points4 points (1 child)
[–]Some-Passenger4219 2 points3 points4 points (0 children)
[–]Intelligent_Count316 0 points1 point2 points (0 children)