Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: change default python version 
Python :: how to redirect in flask to the same page 
Python :: plotly update legend title 
Python :: python convert string to date 
Python :: install nltk in python 
Python :: python file location path 
Python :: what is cleaned data in django 
Python :: how to remove in null values in pandas 
Python :: combine dataframes 
Python :: how to count range in django template 
Python :: python defaultdict 
Python :: hmac in python 
Python :: python font family list 
Python :: How to Create Caesar Cipher Using Python 
Python :: python typed list 
Python :: change tensor type pytorch 
Python :: how to make custom buttons tkinter 
Python :: exec to return a value python 
Python :: groupby year datetime pandas 
Python :: Concat and Append DFs Python 
Python :: pathlib path get directory of current file 
Python :: how to make a for loop increment by 2 in python 
Python :: pandas dataframe scan column for values between numbers 
Python :: Get List Into String 
Python :: paginate on APIView drf 
Python :: pyodbc sql save pandas dataframe 
Python :: python set negative infinity 
Python :: Django Check hashed Password 
Python :: How many columns have null values present in them? in pandas 
Python :: find record where dataframe column value contains 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =