Answers for "split string apart by character python"

1

python split every character in string

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

python split string every character

s = "foobar"
s = list(s)
print(s)

<output: ['f', 'o', 'o', 'b', 'a', 'r']>
Posted by: Guest on September-25-2021

Code answers related to "split string apart by character python"

Python Answers by Framework

Browse Popular Code Answers by Language