Answers for "python split a string to a list of characters"

0

python split every character in string

def split(word): 
    return [char for char in word]
Posted by: Guest on September-21-2020
1

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 "python split a string to a list of characters"

Python Answers by Framework

Browse Popular Code Answers by Language