Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

3x double quotes vs single quotes, python

Name: Anonymous 2011-01-13 23:27

Quick, easy question:
In Python language:
What is the difference between using either triple `` (double quotes) over using triple ` (single quotes).
What advantages do each provide?

Name: Anonymous 2011-01-14 0:53

>>12
Hahahaha, as if his name is Guido...
but nevermind all that, I need help here people ^.^
Just those 2 questions:
1)In what situations would using single or double quotes provide an advantage over the other (or be necessary)
2)How come:
double = "I am 6'2\" tall." # escape double-quote inside string
single = 'I am 6\'2" tall.' # escape single-quote inside string
print "%r %r" % (double, single)
#is outputting
C:\Python27\exercises>python temp.py
'I am 6\'2" tall.' 'I am 6\'2" tall.'
#instead of the exact code like it should?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List