1def split(word):
2 return [char for char in word]
3
4# Driver code
5word = 'geeks'
6print(split(word))
7
8#Output ['g', 'e', 'e', 'k', 's']
1def split(string_with_spaces):
2 string_list = string_list.split()
3 list_split_string = []
4 for i in string_list:
5 list_split_string.append(list(i))
6 return list_split_string
1# Python3 - separate each character of non-spaced string
2
3def split(string):
4 return [letter for letter in string]
5
6# Driver code
7string = 'split this string'
8print(split(string))
9