Single and double quotes may both be used, just so long as opening and closing tokens match. Python offers two variations on quoting that are frequently useful. See the below discussion of regular expressions to see why this is useful. For sequential line-oriented processing, or if a file is likely to be larger than available memory, don't use this method. This is useful to do remarkably often.
Regular expressions are a complicated topic.
A regular expression is a way of describing a pattern that might occur in a text. The trick is encoding this description in the compact syntax of regular expressions. Even though only one or two lines of code may be involved, those lines will effectively incorporate a small program. The first thing to start with is the smallest bits. The simplest character class is a single character, which is just included in the pattern as a literal.