Question #329046

Print all numbers between 1 to 1000 which are divisible by 7 and must not be divisible by 5


Expert's answer

answer = [i for i in range(1, 1001) if not(i % 7) and i % 5]
for i in answer:
	print(i)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS