On 30-Apr-09, at 12:12 AM, Dave Crouse wrote:

Trying to print something with a { in it.
Probably extremely simple, but it's frustrating me.  :(

print ('The \"This is a test \" {')

i get this error

ValueError: Single '{' encountered in format string


Worked perfectly for me.
===
$ python3.0
Python 3.0 (r30:67503, Jan 14 2009, 09:13:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print ('The \"This is a test \" {')
The "This is a test " {
>>>
===

- shantanoo

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to