Reports invalid escape sequences in string and bytes literals.

Starting from Python 3.6, escape sequences that are not recognized (such as \.) produce a SyntaxWarning. In future Python versions, they will become a SyntaxError.

To fix this, you can either escape the backslash (e.g., \\.) or use a raw string (e.g., r'\.').

Example:


# Warning: Invalid escape sequence '\.'
print('\.')

# Correct
print(r'\.')
print('\\.')