Skip to content
Home » Python program to print odd numbers in a list

Python program to print odd numbers in a list

Below is the Python program to display odd numbers in a list

# print odd numbers in a list
lst=list(eval(input("Enter list numbers:")))
for i in lst:
if i%2!=0:
print(i)

Output:

Enter list numbers:5,7,2,6,3,4,9
5
7
3
9