I have a list with a unicode string in a form of a list.
my_list = [u'[James, Williams, Kevin, Parker, Alex, Emma, Katie\xa0, Annie]']
I want a list which I am able to iterate such as;
name_list = [James, Williams, Kevin, Parker, Alex, Emma, Katie, Annie]
I have tried several possible solutions given here, but none of them worked in my case.
# Tried
name_list = name_list.encode('ascii', 'ignore').decode('utf-8')
#Gives unicode return type
# Tried
ast.literal_eval(name_list)
#Gives me invalid token error