I was wondering what the simplest way to convert a string list like
x =u'[ "A","B","C" , " D"]' -in case user puts spaces in between the commas , and spaces inside of the quotes . I need to handle that as well
to
x = ["A","B","C","D"]
in python.
I know I can strip spaces with strip and split using the split operator and check for non alphabets . But the code was getting very kludgy. Is there a quick function I dont know of