Answers for "split a string in to a list of chars"

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

Code answers related to "split a string in to a list of chars"

Python Answers by Framework

Browse Popular Code Answers by Language