install itertools
sudo pip3 install more-itertools
4
2
from itertools import combinations_with_replacement
s, k = input().split()
for c in combinations_with_replacement(sorted(s), int(k)):
print("".join(c))
Thank you!
2
0
4.14
7
from itertools import combinations
from itertools import permutations
Thank you!
7
0
Are there any code examples left?
New code examples in category Shell/Bash