Answers for "how to split a string python letter by letter"

3

how to split a word into letters in python

def split(word):
    return [char for char in word] 

word = "word"
print(split(word))
#output: ["w", "o", "r", "d"]
Posted by: Guest on February-27-2021
6

python split string in characters

s = "foobar"
list(s)
['f', 'o', 'o', 'b', 'a', 'r']
Posted by: Guest on January-25-2021

Code answers related to "how to split a string python letter by letter"

Python Answers by Framework

Browse Popular Code Answers by Language