coderz.py

Keep Coding Keep Cheering!

Python __name__ Variable

Because Python lacks a main() function, when the command to run a Python program is given to the interpreter, the code at level 0 indentation is executed. However, it will first define a few special variables. One such special variable is __name__. If the source file is run as the main program, the interpreter assigns […]

January 11, 2023 | python | No comments

Modules and Functions in Python

What exactly is a Python Module? Python modules are files that contain Python definitions and statements. Functions, classes, and variables can all be defined by a module. A module may also contain executable code. Grouping related code into modules makes it easier to understand and use the code. It also helps to organize the code […]

November 18, 2022 | python | No comments

Advertisement