Computer Science, asked by myth149, 1 month ago

Write a program that read 10 numbers from the user and store that numbers in a

LIST, than replace all even numbers by 0, and display the list after change​

Answers

Answered by pradeepr7654321
0

Answer:

I worked hard so give me more point

m = input("Enter the 10 digit number and separate with \",\" :- ")

a = m.split(",")

a = list(map(int,a))

for k in a :

if k % 2 == 0 :

ind = a.index(k)

a.remove(k)

a.insert(ind,0)

print(a)

Similar questions