Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to seperate words and number in a list

ip=['a',1,2,3]
m=[]
n=[]
for x in range(0,len(ip):
    if str(ip[x]).isdigit():
        m.append(ip[x])
    else:n.append(ip[x])
print(m,n)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #seperate #words #number #list
ADD COMMENT
Topic
Name
9+5 =