Symptom
After the code is directly copied to the .py file, unexpected characters may exist after the backslashes (\).
Solution
Delete the indentations or spaces after the backslashes (\).