The Python docs have several interesting examples of using the `atexit` module.
Here is a module that can initialize a counter from a file when it is imported and save the counterβs updated value automatically when the program terminates
Thanks for reading my short thread on #Python's amazing `atexit` module!
You should give `atexit` a try. It looks like a really handy module.
Follow me to learn more about Python and its amazing modules
What kind of typing does #Python π have? Let's talk about that!
Let's start with strong πͺ typing!
Strong typing means that variables have a type (int, str, dict, etc) and that that type matters when you perform an operation on the variable.
An example of an operation is addition or subtraction
Because of strong typing, variables need to be compatible when doing an operation on them. In #Python, you can add integers and floats together because they are compatible types.
But you can't add integers and strings together! ππ€―