Answers for "split string python into characters"

12

how to split text into list python by characters

txt = "foobar"
print(list(txt)) # ["f", "o", "o", "b", "a", "r"]
Posted by: Guest on December-09-2021
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 "split string python into characters"

Python Answers by Framework

Browse Popular Code Answers by Language