Write a python program using function which take a list as argument and replace every odd value with 0
L=[34,12,55,77,44,89,23]
Output will be
L=[34,12,0,0,44,0,0]
Answers
Answered by
0
Answer:
for i in range(len(L)):
modulus = L[i] % 2
if (modulus == 1):
L[i]=0
print(L)
Explanation:
Similar questions
Social Sciences,
3 months ago
Social Sciences,
7 months ago
Math,
7 months ago
Hindi,
1 year ago
English,
1 year ago
Math,
1 year ago