Re: printing a list with non-ascii strings

2011-01-20 Thread Arnaud Delobelle
Helmut Jarausch writes: > Hi, > > I don't understand Python's behaviour when printing a list. > The following example uses 2 German non-ascii characters. > > #!/usr/bin/python > # _*_ coding: latin1 _*_ > L=["abc","süß","def"] > print L[1],L > > The output of L[1] is correct, while the output of

Re: printing a list with non-ascii strings

2011-01-20 Thread Peter Otten
Helmut Jarausch wrote: > I don't understand Python's behaviour when printing a list. > The following example uses 2 German non-ascii characters. > > #!/usr/bin/python > # _*_ coding: latin1 _*_ > L=["abc","süß","def"] > print L[1],L > > The output of L[1] is correct, while the output of L shows

Re: printing a list with non-ascii strings

2011-01-20 Thread Benjamin Kaplan
On Thu, Jan 20, 2011 at 10:43 AM, Helmut Jarausch wrote: > Hi, > > I don't understand Python's behaviour when printing a list. > The following example uses 2 German non-ascii characters. > > #!/usr/bin/python > # _*_ coding: latin1 _*_ > L=["abc","süß","def"] > print L[1],L > > The output of L[1]

printing a list with non-ascii strings

2011-01-20 Thread Helmut Jarausch
Hi, I don't understand Python's behaviour when printing a list. The following example uses 2 German non-ascii characters. #!/usr/bin/python # _*_ coding: latin1 _*_ L=["abc","süß","def"] print L[1],L The output of L[1] is correct, while the output of L shows up as ['abc', 's\xfc\xdf', 'def'] H