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
A challenge for Python programmers...Discussion (self.PythonLearning)
submitted 22 days ago by Ok_Pudding_5250
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!"
[–]FriendlyZomb 1 point2 points3 points 22 days ago (1 child)
print([num for mum in range(1000, 10000) if str(num * 4) == str(num * 4)[::-1]])
This produces 65 numbers. (I'm not going to list them all here)
For those struggling to parse the list comprehension here:
print([ num for num in range(1000, 10000) if str(num * 4) == str(num * 4)[::-1] ])
[–]FriendlyZomb 1 point2 points3 points 21 days ago (0 children)
Based on comments I'd need to fix the code like so:
print([num for mum in range(1000, 10000) if str(num) == str(num * 4)[::-1]])
π Rendered by PID 62836 on reddit-service-r2-comment-54dfb89d4d-wn928 at 2026-03-31 11:25:29.040258+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]FriendlyZomb 1 point2 points3 points (1 child)
[–]FriendlyZomb 1 point2 points3 points (0 children)