Friday, October 29, 2021

Main

 Found the use of this mysterious bit of python code:


It is instructions to the interpreter to run this file as the main one. Because a project

can easily have more than one .py file in it, and one needs to check if it is one that is

imported or one doing the importing...

                                                                *     *     *

The underscore, in Python, is generally used to print the last output. It can

also bee used as a nameless variable.



By convention, coders use it to tell later users of some code to keep something private.





No comments: