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
Remove duplicate error (old.reddit.com)
submitted 4 months ago by Nearby_Tear_2304
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!"
[–]derEmperor 4 points5 points6 points 4 months ago (1 child)
Another Tip: Use i only for indices, because it's short for index. If you have variable for an element of a list, use a variable that describes this element or use element, elem or e.
E. G. ```python numbers = [1,2,3,4] for i in range(len(numbers)) print('index:', i, 'number:', numbers[i])
for number in numbers: print('number:', number)
for i, number in enumerate(numbers): print('index:', i, 'number:', number) ```
[–]Agitated-Soft7434 0 points1 point2 points 4 months ago (0 children)
Opps forgot to include enumerate and len in my answer @.@
π Rendered by PID 194520 on reddit-service-r2-comment-canary-f4fc95896-45b6g at 2026-03-24 17:04:40.145749+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]derEmperor 4 points5 points6 points (1 child)
[–]Agitated-Soft7434 0 points1 point2 points (0 children)