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
In python you seldom need to convert a string to a list, because strings and lists are very similar
If you really have a string which should be a character array, do this:
In [1]: x = "foobar"
In [2]: list(x)
Out[2]: ['f', 'o', 'o', 'b', 'a', 'r']
Note that Strings are very much like lists in python
In [3]: x[0]
Out[3]: 'f'
In [4]: for i in range(len(x)):
...: print x[i]
...:
f
o
o
b
a
r
Strings are lists. Almost.