formatted string like---> u'720 S'
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Thu Feb 23 10:40:38 EST 2006
More information about the Python-list mailing list
Thu Feb 23 10:40:38 EST 2006
- Previous message (by thread): Detec nonascii in a string
- Next message (by thread): formatted string like---> u'720 S'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 23 Feb 2006 08:00:16 -0700, Bell, Kevin wrote: > I'm building a dictionary from values a database and upon print the > dictionary I see key value pairs like this: > > u'Briarcliff' : [u'2500 E'], > u'Shumway' : [ u'2600 E'] > > do I need to slice off the "u", or anything? I know it has something to > do with unicode but I don't know how to treat it. No. The u is part of the display of the string, just like the quote marks. Ordinary strings are printed with ' ' delimiters. Unicode strings are printed with u' ' delimiters. -- Steven.
- Previous message (by thread): Detec nonascii in a string
- Next message (by thread): formatted string like---> u'720 S'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list