+ 4
No. that statement does not import any script. it is a test case to see if the current script is being runned directly OR being imported. if it is being runned the special variable __name__ will have value '__main__', this means that what come after the if will be executed if it is being imported, what comes after the if will not be executed. Its a Python trick.
8th Jun 2017, 12:27 AM
Ulisses Cruz
Ulisses Cruz - avatar