Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Escape curly bracket together to a variable extension

90 views
Skip to first unread message

Joan Miller

unread,
Mar 6, 2010, 1:33:17 PM3/6/10
to
How to escape the first '}' in the next string?

s = "}\n{0}".format('foo')

Alf P. Steinbach

unread,
Mar 6, 2010, 1:38:23 PM3/6/10
to
* Joan Miller:

> How to escape the first '}' in the next string?
>
> s = "}\n{0}".format('foo')

s = "}}\n{0}".format('foo')


Cheers & hth.,

- Alf

Gary Herron

unread,
Mar 6, 2010, 1:41:44 PM3/6/10
to pytho...@python.org
'}\nfoo'


Gary Herron

0 new messages