# Python Program to Remove Even Numbers in a List

Write a Python Program to remove the Even Numbers from a given List using for loop. The if statement checks the List item is divisible by two. If True, remove that list item using the list remove function.

```# Remove Even List Items

evenList = [11, 22, 31, 44, 51, 65, 71, 82, 91]
print("List Items = ", evenList)

for ev in evenList:
if (ev % 2 == 0):
evenList.remove(ev)

print("List Items after removing even Items = ", evenList)```

## Python Program to Remove Even Numbers in a List using the While Loop

```# Remove Even index List Items

evenList = []

listNumber = int(input("Enter the Total List Items = "))
for i in range(1, listNumber + 1):
listValue = int(input("Enter the %d List Item = " %i))
evenList.append(listValue)

print("List Items = ", evenList)
i = 0

while (i < len(evenList)):
if (evenList[i] % 2 == 0):
evenList.remove(evenList[i])
i = i + 1

print("List Items after removing even Items = ", evenList)```

Python remove even numbers from a list using a while loop output

``````Enter the Total List Items = 6
Enter the 1 List Item = 21
Enter the 2 List Item = 98
Enter the 3 List Item = 7
Enter the 4 List Item = 32
Enter the 5 List Item = 19
Enter the 6 List Item = 32
List Items =  [21, 98, 7, 32, 19, 32]
List Items after removing even Items =  [21, 7, 19]``````

In this Python example, we used the list comprehension to remove or delete the even numbers from the given list.

```# Remove Even index List Items

evenList = []

listNumber = int(input("Enter the Total List Items = "))
for i in range(1, listNumber + 1):
listValue = int(input("Enter the %d List Item = " %i))
evenList.append(listValue)

print("List Items = ", evenList)

evenList = [ev for ev in evenList if ev % 2 != 0]
print("List Items after removing even Items = ", evenList)```

Remove even numbers from a list using List comprehension output

``````Enter the Total List Items = 3
Enter the 1 List Item = 11
Enter the 2 List Item = 22
Enter the 3 List Item = 33
List Items =  [11, 22, 33]
List Items after removing even Items =  [11, 33]``````

This Python program used the list, filter, and lambda Functions to remove the even numbers.

```# Remove Even index List Items

evenList = []

listNumber = int(input("Enter the Total List Items = "))
for i in range(1, listNumber + 1):
listValue = int(input("Enter the %d List Item = " %i))
evenList.append(listValue)

print("List Items = ", evenList)

oddList = list(filter(lambda x : (x % 2 != 0), evenList))
print("List Items after removing even Items = ", oddList)```

Remove List even numbers output

``````Enter the Total List Items = 4
Enter the 1 List Item = 21
Enter the 2 List Item = 42
Enter the 3 List Item = 99
Enter the 4 List Item = 56
List Items =  [21, 42, 99, 56]
List Items after removing even Items =  [21, 99]``````