formatted string like---> u'720 S'
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Thu Feb 23 10:40:38 EST 2006
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.
More information about the Python-list
mailing list