spam = 0
while spam < 10:
spam = spam + 1
if spam == 3 or spam == 6 or spam == 9:
continue
print('spam is ' + str(spam))
threes = [3,6,9]
spam = 0
while spam < 10:
spam = spam + 1
for i in threes:
if spam == i:
continue
print('spam is ' + str(spam))
Первый код работает отлично, а после - нет.