This code appears to do what you are asking for.
for value in range(1,1000):
if value % 3 == 0 or value % 5 == 0:
print(value)
Or something like
for value in range(1,1000):
if value % 3 == 0 or value % 5 == 0:
some_list.append(value)
Or any number of things.