There's a very simple way to improve Python performance of your code. And you know what's so nice about this performance improvement? It also nudges you to use good Python software design practices - it's a win-win!
Video: https://youtu.be/Fot3_9eDmOs.