As a Python newbie, I was a bit perplexed by the “”"-delimited strings…

From python.org:

In triple-quoted strings, unescaped newlines and quotes are allowed (and are retained), except that three unescaped quotes in a row terminate the string. (A “quote'’ is the character used to open the string, i.e. either ‘ or “.)