Escape curly bracket together to a variable extension
Gary Herron
gherron at islandtraining.com
Sat Mar 6 13:41:44 EST 2010
Joan Miller wrote:
> How to escape the first '}' in the next string?
>
> s = "}\n{0}".format('foo')
>
>>> "}}\n{0}".format('foo')
'}\nfoo'
Gary Herron
More information about the Python-list
mailing list