공부
[Python] split string to char
승가비
2020. 4. 26. 02:44
728x90
>>> s = "foobar"
>>> list(s)
['f', 'o', 'o', 'b', 'a', 'r']
https://stackoverflow.com/questions/4978787/how-to-split-a-string-into-array-of-characters
How to split a string into array of characters?
I've tried to look around the web for answers to splitting a string into an array of characters but I can't seem to find a simple method str.split(//) does not seem to work like Ruby does. Is ther...
stackoverflow.com
728x90