Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools
- for i in itertools.combinations_with_replacement('0123456789', 4):
- print(''.join(i))
- 0000
- 0001
- 0002
- 0003
- 0004
- 0005
- 0006
- 0007
- 0008
- 0009
- 0011
- 0012
- 0013
- 0014
- 0015
- 0016
- 0017
- 0018
- 0019
- 0022
- 0023
- 0024
- 0025
- import itertools
- for i in itertools.product('0123456789', repeat=4):
- print(''.join(i))
Add Comment
Please, Sign In to add comment