Question
Asked By – gath
Is there a function in python to split a word into a list of single letters? e.g:
s = "Word to Split"
to get
wordlist = ['W', 'o', 'r', 'd', ' ', 't', 'o', ' ', 'S', 'p', 'l', 'i', 't']
Now we will see solution for issue: Is there a function in python to split a word into a list? [duplicate]
Answer
>>> list("Word to Split")
['W', 'o', 'r', 'd', ' ', 't', 'o', ' ', 'S', 'p', 'l', 'i', 't']
This question is answered By – Greg Hewgill
This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0