Guest User

Untitled

a guest
Jan 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import itertools
  2.  
  3. for i in itertools.combinations_with_replacement('0123456789', 4):
  4. print(''.join(i))
  5.  
  6. 0000
  7. 0001
  8. 0002
  9. 0003
  10. 0004
  11. 0005
  12. 0006
  13. 0007
  14. 0008
  15. 0009
  16. 0011
  17. 0012
  18. 0013
  19. 0014
  20. 0015
  21. 0016
  22. 0017
  23. 0018
  24. 0019
  25. 0022
  26. 0023
  27. 0024
  28. 0025
  29.  
  30. import itertools
  31.  
  32. for i in itertools.product('0123456789', repeat=4):
  33. print(''.join(i))
Add Comment
Please, Sign In to add comment