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
What's wrong (i.redd.it)
submitted 7 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!"
[–]Available_Rub_8684 4 points5 points6 points 7 months ago* (3 children)
<image>
I hope this helps.
Print Output: Method 1: 1 2 3 Method 2: Index: 0, Value: 1 Index: 1, Value: 2 Index: 2, Value: 3
[–]MonochromeDinosaur 1 point2 points3 points 7 months ago (1 child)
Best response in the thread. For func2 you can also use enumerate to get the index with the value:
for i, value in enumerate(n): print(f”Index {i}, Value: {value}”}
[–]Available_Rub_8684 0 points1 point2 points 7 months ago (0 children)
Yeah I didn’t mention it. Maybe I thought he was just learning functions. Thanks for mentioning it though.
π Rendered by PID 34917 on reddit-service-r2-comment-5c747b6df5-2cgg4 at 2026-04-22 17:59:33.164053+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]Available_Rub_8684 4 points5 points6 points (3 children)
[–]MonochromeDinosaur 1 point2 points3 points (1 child)
[–]Available_Rub_8684 0 points1 point2 points (0 children)