You are viewing a single comment's thread. Return to all comments →
from itertools import combinations_with_replacement n,r = input().split() n = sorted(n) r = int(r) l1 = list(combinations_with_replacement(n,r)) for items in l1: print("".join(items),end="\n")
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 →