static variables inside a function

In C a static variable inside a function is only visible inside that function’s scope, but its lifetime is the entire life of the program, and it’s only initialized once. There is NO equivalence in Python. So if you want to be a proper python programmer you should just accept that! Use a class, use […]

Read More

Naming conventions in Python

Whilst you can do what you want, the creators of Python specify naming conventions that should be followed: ClassNamesInStudlyCaps CONSTANTS_IN_ALL_CAPS variable_names_in_snake_case method_names_in_snake_case function_names_in_snake_case

Read More

.Functions general

Using Parameters Default values Return values Multiple return values Using a dictionary for multiple return values Calling a function before it is defined Nope. You don’t do that in Python! All functions must be defined before they are used.

Read More