If you want to use a linter to find code that could be written better (and pull out your hair while doing so) pylint is for you! To make you feel extra bad, pylint even gives you a score out of 10!
To install: pip3 install pylint
Usage: pylint <Directory or File>