Issues concerning running a python file
Criseist (0)

I just started a new project to mess around a bit and found something odd. I'm getting thrown a syntax error from this code:

if __name__ == "__main__":

Now, unless I'm blind, I don't see any issues with this code. I've checked outside sources, including python itself, and have found the same statement written over and over again. Furthermore, this line of code works with my other repl's. I have tried copy/paste and the error persists.

Has anyone had the same or similar issue? Am I just stupid? Any help would be greatly appreciated!

Edit: Fixing markup

You are viewing a single comment. View All
Answered by malvoliothegood (432) [earned 5 cycles]
View Answer
Criseist (0)

@malvoliothegood Thanks, that fixed it! Wondering why the error message referenced a different line then.