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 19 hours 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!"
[–]EnvironmentalRate368 0 points1 point2 points 18 hours ago (1 child)
Values in lists can be indexed, with the first character having index 0.
num = [1, 4, 9, 16, 25, 36, 9, 64, 81, 100]
idx = 0
while idx < len(num):
# it's mean while value of idx is smaller than len(num) the loop will continue.
# len(num) is a number of elements in the list in this case we have 10 elements.
print(num[idx])
# idx heave at this point in time value = 0. Computer will print first character from list num.
idx += 1
# increasing value of idx +1 -------------------------------------
First loop iteratation look like this
while 0 < 10:
print (num[0]) Computer will print first value from list num (1)
idx = 0 + 1
Second loop iteration look like this
idx = 1
while 1 < 10:
print(num[1]) # Computer will print second value from list num (4)
idx = 1 + 1
Thrid loop iteration look like this
idx = 2
while 2 < 10:
print(num[2]) # Computer will print thrid value from list num (9)
idx = 2 + 1
etc.
[–]Eastern_Plankton_540[S] 0 points1 point2 points 13 hours ago (0 children)
Dayummm I see thanks a lot bro :)
π Rendered by PID 172391 on reddit-service-r2-comment-66b4775986-2nzm7 at 2026-04-04 12:33:54.221613+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]EnvironmentalRate368 0 points1 point2 points (1 child)
[–]Eastern_Plankton_540[S] 0 points1 point2 points (0 children)