Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How To Convert String Into List In Python

#use this self made function when there is no good delimiter for the string
def Convert(string):
    list1=[]
#the next line does the changing of the string into an array
#literally it means all elements up to but not including the first one, but just remember it as this is the way we turn a spaceless string into an array
list1[:0]=string
    return list1
str1="abcdefghjiklmnopqrstuwxyz"
print(Convert(str1))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #To #Convert #String #Into #List #In #Python
ADD COMMENT
Topic
Name
7+5 =