[Tutor] Printing Problem python 3

Dave Crouse dcml1 at crouse.us
Wed Apr 29 23:15:10 CEST 2009


I got the same thing with idle, but when running as a script, it's not
the same, it errors. I tried it on Windows and Linux.

-------------------------------------------

[davec at Arch64 Python]$ less test.py
#/usr/bin/python3
print ('The \"This is a test \" {')

[davec at Arch64 Python]$ sh test.py
test.py: line 3: syntax error near unexpected token `'The \"This is a
test \" {''
test.py: line 3: `print ('The \"This is a test \" {')'


[davec at Arch64 Python]$ python3
Python 3.0.1 (r301:69556, Feb 22 2009, 14:12:04)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print ('The \"This is a test \" {')
The "This is a test " {
>>>
-------------------------------------------

However the double quotes was exactly what the doctor ordered ! :)



2009/4/29 "Shantanoo Mahajan (शंतनू महाजन)" <shantanoo at gmail.com>:
> print ('The \"This is a test \" {')


More information about the Tutor mailing list