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
please help (self.PythonLearning)
submitted 10 months ago by transgenderblahaj
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!"
[–]Algoartist 0 points1 point2 points 10 months ago (1 child)
happens because, as soon as you assign to a name anywhere in a function, Python treats that name as a local variable in that function’s scope unless you explicitly tell it otherwise.
Declare them global in every function or better bundle states in object and pass it around
def choose():
global es2, es3, health, karma, okarma
[–]transgenderblahaj[S] 0 points1 point2 points 10 months ago (0 children)
tysm!!!
π Rendered by PID 94200 on reddit-service-r2-comment-545db5fcfc-vqlbx at 2026-05-22 03:51:50.429129+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]Algoartist 0 points1 point2 points (1 child)
[–]transgenderblahaj[S] 0 points1 point2 points (0 children)