Back
I've attempted to check out the web for answers to split a string into an array of characters yet I can't locate a basic technique
str.split(//) doesn't appear to work as Ruby does. Is there a basic method of doing this without looping?
You want list.
>>> s = "foobar">>> list(s)['f', 'o', 'o', 'b', 'a', 'r']
>>> s = "foobar"
>>> list(s)
['f', 'o', 'o', 'b', 'a', 'r']
Are you searching for a good course to learn python? Join the python course.
31k questions
32.8k answers
501 comments
693 users