string length problem?

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

On Jan 7, 9:40 pm, Qian Xu <quian... at> 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.

More information about the Python-list mailing list