How to convert unicode list to ascii list?

Mark Kingston mkingston at shaw.ca
Thu Mar 20 18:09:54 CET 2003


Thanks for your help everyone.

Mark.


"Mark Kingston" <mkingston at shaw.ca> wrote in message
news:Y99ea.39773$wW.3817669 at news2.telusplanet.net...
> Hi all,
>
> When I use the following code:
>    groups = win32net.NetUserGetLocalGroups(None, 'username')
>
> The list returned is in unicode:
>   [u'Debugger Users', u'OLAP Administrators', u'Administrators']
>
> I tried accessing the elements using:
>    firstElement = groups[0]
> but it returns only this:  '['
>
> How can I convert this list to a normal ASCII list so that I can access
each
> element as ASCII?
>
> Thanks for your help
>
> Mark
>
> mkingston at shaw.ca
>
>






More information about the Python-list mailing list