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