How do you convert a string into a list?
Say the string is like text = \"a,b,c\". After the conversion, text == [\'a\', \'b\', \'c\'] and h
text = \"a,b,c\"
text == [\'a\', \'b\', \'c\']
All answers are good, there is another way of doing, which is list comprehension, see the solution below.
u = "UUUDDD" lst = [x for x in u]
for comma separated list do the following
u = "U,U,U,D,D,D" lst = [x for x in u.split(',')]