Quoted from https://www.geeksforgeeks.org/python-split-string-into-list-of-characters/
Solution #1: Using For loop
This approach uses for loop to convert each character into a list. Just enclosing the For loop within square brackets [] will split the characters of word into list.
def split(word):
return [char for char in word]
word = 'geeks'
print(split(word))
Output:
['g', 'e', 'e', 'k', 's']
Solution #2: Typecasting to list
Python provides direct typecasting of string into list using list()
def split(word):
return list(word)
word = 'geeks'
print(split(word))
Output:
['g', 'e', 'e', 'k', 's']