Answer to Question #329046 in Python for Shubham Tiwari

Question #329046

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


1
Expert's answer
2022-04-15T16:34:35-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS