Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?
You must log in or register to comment.
Luckily Python is one step ahead:
Python 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 15.0.1 20250418 (Red Hat 15.0.1-0)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> if __name__ = "__main__": ... ... main() ... File "<python-input-0>", line 1 if __name__ = "__main__": ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
yea I also couldnt get the formatting to work right, triple quotes kept turning things into accented letters, so I gave up.
and also := also known as the walrus operator is very fun and sometimes very convenient to use