How to convert unicode list to ascii list?
mkingston at shaw.ca
Thu Mar 20 05:33:37 CET 2003
Thanks for your help Brian.
Looking at your example, I realized that I made the mistake of doing this to
the list first:
"Brian Munroe" <bmunroe at tribador.nu> wrote in message
news:mailman.1048128336.30199.python-list at python.org...
> > -----Original Message-----
> > On Behalf Of Mark Kingston
> > Sent: Wednesday, March 19, 2003 5:53 PM
> > To: python-list at python.org
> > Subject: How to convert unicode list to ascii list?
> > I tried accessing the elements using:
> > firstElement = groups
> > but it returns only this: '['
> > How can I convert this list to a normal ASCII list so that I can access
> > element as ASCII?
> you can use str(groups) to convert it, but I tried your example via the
> command interpeter that comes with ActivePython 2.2.2 and it returned
> Users', so maybe something else is wrong with your install?
> -- brian
More information about the Python-list