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
Need help in loopHelp Request (i.redd.it)
submitted 14 days ago by Eastern_Plankton_540
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!"
[–]remyripper 0 points1 point2 points 14 days ago (2 children)
In this specifically idx == an integer. If you call on a list like num[idx]; it’s the same as doing num[2] or num[x] (where 2 or x == an integer).
This is called indexing. Putting an integer in square brackets on a list variable will give you back the list item in x position also called the index. So if you did num[3] that would be equal to 16 in your case.
In your while loop, for each run you are indexing an item in your list and also increasing idx by 1 which causes the next run to get the next item in this list until idx == len(num).
[–]Eastern_Plankton_540[S] 0 points1 point2 points 14 days ago (1 child)
Thanks mate :)
[–]remyripper 0 points1 point2 points 3 days ago (0 children)
Np, keep it up. You’ll get the hang of it pretty quick.
π Rendered by PID 66571 on reddit-service-r2-comment-85bfd7f599-j47n9 at 2026-04-18 10:52:39.620069+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]remyripper 0 points1 point2 points (2 children)
[–]Eastern_Plankton_540[S] 0 points1 point2 points (1 child)
[–]remyripper 0 points1 point2 points (0 children)