Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to take out every even number from a list in python

list1 = [11,23,45,23,64,22,11,24]
# iteration
for num in list1:
   # check
   if num % 2 == 0:
      print(num, end = " ")
Comment

PREVIOUS NEXT
Code Example
Python :: pandas change column type 
Python :: python turtle module 
Python :: python read input 
Python :: python loop backward 
Python :: lists to dictionary python 
Python :: with open 
Python :: django template render dict 
Python :: mean along third dimension array python 
Python :: python dictionary pop key 
Python :: how to append in dictionary in python 
Python :: python convert ascii to char 
Python :: python os module 
Python :: pandas como quitar comillas simples de una columna 
Python :: python zip folder and subfolders 
Python :: how to set pandas dataframe as global 
Python :: how to convert float to string in python 
Python :: python min value index from an array 
Python :: check datatype python 
Python :: update all pip packages 
Python :: can serializer returns an object in django 
Python :: python towers of hanoi recursive 
Python :: python __lt__ 
Python :: Display an image over another image at a particular co-ordinates in openCV 
Python :: how to hide tkinter window 
Python :: how to merge two column pandas 
Python :: Python script for computing descriptive statistics 
Python :: pyautogui doc 
Python :: flask No application found. Either work inside a view function or push an application context 
Python :: get files in directory and subdirectory 
Python :: python sys 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =