You are viewing a single comment's thread. Return to all comments →
from itertools import combinations_with_replacement input_string, size = input().split() sorted_string = sorted(input_string) for item in combinations_with_replacement(sorted_string, int(size)): print(*item, sep="")
Seems like cookies are disabled on this browser, please enable them to open this website
itertools.combinations_with_replacement()
You are viewing a single comment's thread. Return to all comments →