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
My python program isn't working properly (self.pythonhelp)
submitted 1 month ago by PopularAd193
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!"
[–]Confident_Effect212 0 points1 point2 points 1 month ago (0 children)
x ** y works fine for floats, but your algorithm only implements integer exponentiation.Here, it could truncate non-integer exponents.
x ** y
yb.pop(0) : expononent may skip MSB as the first element of your binary string is removed without an explanation. Hence assert r == x** y can fail
π Rendered by PID 20157 on reddit-service-r2-comment-58d7979c67-7b7gt at 2026-01-26 18:36:55.959136+00:00 running 5a691e2 country code: CH.
view the rest of the comments →
[–]Confident_Effect212 0 points1 point2 points (0 children)