Illegal literal or not?
Peter Hansen
peter at engcorp.com
Sat Jan 25 16:46:06 EST 2003
More information about the Python-list mailing list
Sat Jan 25 16:46:06 EST 2003
- Previous message (by thread): Illegal literal or not?
- Next message (by thread): Illegal literal or not?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gerrit Holl wrote: > > Peter Hansen schreef op zaterdag 25 januari om 20:32:03 +0000: > > Mel Wilson wrote: > > > >>> print "'" + '"' + "Let's try this!" + '"' + ', they said.' + "'" > > > >>> print ''.join (["'", '"', "Let's try this!", '"', ', they said.', "'"]) > > > >>> print '"'.join(["'", "Let's try this!", ", they said.'"]) > > '"Let's try this!", they said.' > > >>> print "'"'"'"Let's try this!"'"'', they said.'"'" > '"Let's try this!", they said.' > > :) Oooohh, very slick. Automatic concatenation of adjacent string literals. :-) <hat mode="doffed"/> -Peter
- Previous message (by thread): Illegal literal or not?
- Next message (by thread): Illegal literal or not?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list