I want to pop elements divisible by 3 and 7 from the list. This is the code I wrote, but it's not working properly.
tab = []
for i in range(20):
tab.append(int(input("Input number: ")))
for i in tab:
if (i % 3 != 0) and (i % 7 != 0):
continue
else:
tab.pop(i)
print(tab)