Write a Python program to print the numbers of a specified list after removing even numbers from it.
Last updated: September 3, 2024 By Sunil Shaw
def func(lst):
new_list = []
for i in lst:
if i%2 != 0:
new_list.append(i)
return new_list
l = [2, 3, 4, 8, 10]
print(func(l))
About Author
I am a Web Developer, Love to write code and explain in brief. I Worked on several projects and completed in no time.
View all posts by Sunil Shaw