Computer Science, asked by niko11, 4 months ago

Find and write the output of the following python code:


def replace(M,N):

for i in range(N):

if M[i]%5==0:

if i==N-1:

M[i]=M[i]

else:

M[i]=M[i+1]

if M[i]%3==0:

M[i]=M[i-1]

L=[55,67,21,22,91]

replace(L, len(L))

for i in L:

print(i, end='#')

i)
67#67#67#22#91

ii) 67#67#67#22#91#

iii)
67#67#67#22#22#

iv)
67#67#22#22#91#​

Answers

Answered by NehaKhaire
1

Answer:

you will get the answer on Google

hope you will get answer

Similar questions