📜  安装 itertools - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:26.489000             🧑  作者: Mango

代码示例3
from itertools import combinations_with_replacement

s, k = input().split()

for c in combinations_with_replacement(sorted(s), int(k)):
    print("".join(c))