Answers for "python list string to array"

6

python string to array

>>> text = 'a b c'
>>> text = text.split(' ')
>>> text
[ 'a', 'b', 'c' ]
Posted by: Guest on May-10-2020
0

Python String to array using list() method

# Split the string to array of characters

text1= "ABCDEFGH"
print(list(text1))

text2="A P P L E"
print(list(text2))
Posted by: Guest on December-08-2021

Code answers related to "python list string to array"

Python Answers by Framework

Browse Popular Code Answers by Language