ALEXANDAR_GEORGIEV

barcode_generator

Jun 5th, 2022 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. num_start = int(input())
  2. list_num_start = []
  3. num_start_str = str(num_start)
  4. for x in num_start_str:
  5.     list_num_start.append(int(x))
  6. num_end = int(input())
  7. list_num_end = []
  8. list_a = []
  9. list_b = []
  10. list_c = []
  11. list_d = []
  12. num_end_str = str(num_end)
  13. for x in num_end_str:
  14.     list_num_end.append(int(x))
  15. for a in range(list_num_start[0], list_num_end[0] + 1):
  16.     if a % 2:
  17.         list_a.append(a)
  18. for b in range(list_num_start[1], list_num_end[1] + 1):
  19.     if b % 2:
  20.         list_b.append(b)
  21. for c in range(list_num_start[2], list_num_end[2] + 1):
  22.     if c % 2:
  23.         list_c.append(c)
  24. for d in range(list_num_start[3], list_num_end[3] + 1):
  25.     if d % 2:
  26.         list_d.append(d)
  27.  
  28. for a in list_a:
  29.     i = a * 1000
  30.     for b in list_b:
  31.         j = b * 100
  32.         for c in list_c:
  33.             k = c * 10
  34.             for d in list_d:
  35.                 z = i + j + k + d
  36.                 print(z, end=' ')
Add Comment
Please, Sign In to add comment