Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python program to print odd numbers in a List

# Python program to print odd Numbers in a List
  
# list of numbers
list1 = [10, 21, 4, 45, 66, 93]
  
# iterating each number in list
for num in list1:
      
    # checking condition
    if num % 2 != 0:
       print(num, end = " ")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Python #program #print #odd #numbers #List
ADD COMMENT
Topic
Name
8+1 =