Robin
0
Q:

python string to array

>>> text = 'a b c'
>>> text = text.split(' ')
>>> text
[ 'a', 'b', 'c' ]
1
# Python code to convert string to list 
  
def Convert(string): 
    li = list(string.split(" ")) 
    return li 
  
# Driver code     
str1 = "Geeks for Geeks"
print(Convert(str1)) 
0

New to Communities?

Join the community