How to convert unicode list to ascii list?

Mark Kingston mkingston at shaw.ca
Wed Mar 19 20:52:56 EST 2003


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