Is there a function in python to split a word into a list?

gath picture gath · Sep 22, 2008 · Viewed 281.2k times · Source

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' ....]

Answer

Greg Hewgill picture Greg Hewgill · Sep 22, 2008
>>> list("Word to Split")
['W', 'o', 'r', 'd', ' ', 't', 'o', ' ', 'S', 'p', 'l', 'i', 't']