The official purpose for these is that on Windows they will suppress the console window that comes up when you double-click on a .py file to run it, but it generally works well as a secondary file extension for your top-level code, particularly for GUI apps: https://docs.python.org/3/tutorial/appendix.html#executable-python-scripts