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
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
Math,
2 months ago
Computer Science,
4 months ago
Math,
4 months ago
English,
10 months ago
Math,
10 months ago