Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nums = [x for x in range(1, 50)]
- divs = [3, 5]
- correct = []
- isCorrect = bool()
- for num in nums:
- for div in divs:
- if num % div == 0:
- correct.append(num)
- isCorrect = True
- print(f"{num}/{div} = {isCorrect}", end=" "); print(*correct, sep=", ")
- isCorrect = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement