Mega Code Archive

 
Categories / Python Tutorial / String
 

Creating strings and using quote characters in strings

print "This is a string with \"double quotes.\"" print 'This is another string with "double quotes."' print 'This is a string with \'single quotes.\'' print "This is another string with 'single quotes.'" print """This string has "double quotes" and 'single quotes'.    You can even do multiple lines.""" print '''This string also has "double" and 'single' quotes.'''