Use %% . >>> """x like 'hello%' and y = %s"""
"x like 'hello%' and y = %s"
>>> """x like 'hello%' and y = %s"""%"what"
Traceback (most recent call last):
File "", line 1, in ValueError: unsupported format character ''' (0x27) at index 14
>>> """x like 'hello%%' and y = %s"""%"what"
"x like 'hello%' and y = what"
... View more