Advertisement
Spocoman

01. Numbers Ending in 7

Dec 24th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. for i in range(1, 1001, 1):
  2.     if i % 10 == 7:
  3.         print(i)
  4.  
  5.  
  6. Оптимално решение:
  7.  
  8. for i in range(7, 998, 10):
  9.     print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement