# Python Everyday 21: Taking some actions before leaving by using ‘atexit’

By using the ‘ -i ‘ option, we can execute *.py script before entering the interpreter, moreover, with the “atexit”, we also can take some actions before leaving, here is a sample: