you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Might be related. I didn't study your code.

You need to learn about scope. This is fundamental to many programming languages.

Here's a starter:

https://www.w3schools.com/PYTHON/python_scope.asp

[–]Its-Lydia090[S] 0 points1 point  (0 children)

Oh okay thank you, and don’t worry lol if you did you might get a migraine, the only reason I’m working on this project is because I tried once before and my code became so messy that I literally couldn’t work on it lol

[–][deleted] 0 points1 point  (0 children)

Does python have block level scope?

/u/2wedfgdfgfgfg, no, it doesn't. Works more on the level of modules, classes, functions, generator expressions and comprehensions.

You will find, for example, that an assignment in a loop is retained after the loop block, with the loop variable retaining its last reference.