Python tips and tricks you haven't seen

I want to note that all those features are part of Python standard library, so whenever you decide to implement something in Python first go looking for it in standard library.

Improve performance of your Python program.