I wanted to delete from the list the numbers divisible by 5, but when the values divisible by 5 stand next to each other, it won't delete the second one. Can someone tell me what am I doing wrong? Here is the code:
my_list = []
n = int(input("Size of list: "))
for i in range(n):
my_list.append(int(input("Enter value: ")))
for i in my_list:
if i % 5 != 0:
continue
else:
my_list.remove(i)
print(my_list)