Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_combinations_with_replacement.py
- from itertools import combinations_with_replacement
- alpha = '123'
- for s in combinations_with_replacement(alpha, 3):
- output = ''.join(s)
- print output,
- '''111 112 113 122 123 133 222 223 233 333'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement