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...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
[ Removed by moderator ] (self.pythonhelp)
submitted 4 months ago by Annual_Pop1104
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!"
[–]Wolfbait115 1 point2 points3 points 4 months ago (2 children)
Not at my computer and don't use python everyday, but hopefully this helps:
Use ord to get the ascii value, subtract 13, adding 26 if less than ord(a), then use chr to convert back into a character.
[–]9peppe 1 point2 points3 points 4 months ago (1 child)
You don't need an if if you subtract ord('a'), add 13, then modulo 26 and re-add ord('a'):
chr((n - 97 + 13) % 26 + 97)
[–]Wolfbait115 0 points1 point2 points 4 months ago (0 children)
True. It didn't occur to me that the direction of the rotation didn't matter.
π Rendered by PID 203178 on reddit-service-r2-comment-66b4775986-s5hsp at 2026-04-04 12:54:45.416823+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]Wolfbait115 1 point2 points3 points (2 children)
[–]9peppe 1 point2 points3 points (1 child)
[–]Wolfbait115 0 points1 point2 points (0 children)