Computer Science, asked by flashpoint19515, 7 months ago

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 sravankowshik
0

Answer:

for i in range(len(L)):

   modulus = L[i] % 2

   if (modulus == 1):

       L[i]=0

print(L)

Explanation:

Similar questions