Regular Expressions
This is a tool for composing regular expressions in PHP, Java, and Python: https://regex101.com/
The explanation pane on the top right of the page is the best way I have found to learn regular expression syntax.
The code generator on the left hand menu will give you the proper syntax to import the "re" library and execute your regular expressions in Python.
The tool is excellent for testing regular expressions on sample data sets, I was able to copy and paste a few sequences from my FASTA file and test the different amino acid motifs that I was trying to identify.