string length problem?

John Machin sjmachin at lexicon.net
Wed Jan 7 14:12:03 CET 2009


On Jan 7, 9:40 pm, Qian Xu <quian... at stud.tu-ilmenau.de> wrote:
> Hi All,
>
> why the code
>   print len(u"»test«")
> returns 8 instead of 6?

I suggest that you do
   print repr(u"»test«")
and inspect the result.
HTH,
John



More information about the Python-list mailing list