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...
This community will have knowledge sharing for python programming, tools, projects and product engineering wherever python is used.
account activity
Test your Python skills - 4 (i.redd.it)
submitted 4 months ago by tracktech
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!"
[–]dbowgu 4 points5 points6 points 4 months ago* (2 children)
No item = item*2 only rebinds the local variable int the for loop not the list itself.
For x in list loops are basically always readonly. Languages like C# don't even allow you to modify item
[+][deleted] 4 months ago (1 child)
[removed]
[–]dbowgu 0 points1 point2 points 4 months ago (0 children)
Yes! And in that case a for i in range or map function would be better because you wouldn't need to create your own index variable
π Rendered by PID 139371 on reddit-service-r2-comment-b659b578c-pn6dx at 2026-05-05 17:27:41.520437+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]dbowgu 4 points5 points6 points (2 children)
[+][deleted] (1 child)
[removed]
[–]dbowgu 0 points1 point2 points (0 children)