(Sep-23-2019, 01:06 AM)ichabod801 Wrote: First of all, that is not the correct code or you would be getting an indentation error. Second, the if __name__ goes at the end of the file, and is only for code that should not be run when the file is imported. If you stick it in the middle of a function, the function won't do anything when it is imported.
I'm out of the house atm so I'll reply properly later when I can check the code.