How to split a string into a list of characters in Python?
Answer is: You need Lists.
>>> s = "foobar" >>> list(s) ['f', 'o', 'o', 'b', 'a', 'r']
You take the string and pass it to list()
s = "mystring" l = list(s) print l
or You can also do it in this very simple way without list():
>>> [c for c in "foobar"] ['f', 'o', 'o', 'b', 'a', 'r']
If you want to process your String one character at a time. you have various options.
#See for more examples:
how to split a string in python
how to split a string into a list of characters in python
how to split up a string in python