Write a Python function to print the numbers of a specified list after removing even numbers from it.



# Write a Python function to print the numbers of a specified list after removing even numbers from it
def re():
    li = [1,2,3,4,5,6,7,8,9]
    for i in li :
        if i % 2 == 0:
            li.remove(i)
    print(li)
re()

Comments

Popular posts from this blog