While your program may work functionally, it may still be hard to maintain if the style of it is messy. So it would be nice to automated code style. A favourable tool for that the flake8 ecosystem.
This would be a great time to install flake8.
# from a virtualenv python -m pip install flake8