Write a program to print the list after removing delete even numbers in [5,6,77,45,22,12,24].


Topic: Write a program to print the list after removing delete even numbers in [5,6,77,45,22,12,24].

Solution

li = [5, 6, 77, 45, 22, 12, 24]
li = [x for x in li if x % 2 != 0]
print(li)



List all Python Programs