Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

string to list python

# 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))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #string #list #python
ADD COMMENT
Topic
Name
4+8 =