我知道itertools,但它似乎只能生成排列而不重复.
例如,我想为2个骰子生成所有可能的骰子.所以我需要[1,2,3,4,5,6]的大小为2的所有排列,包括重复:(1,1),(1,2),(2,1)......等等
如果可能的话,我不想从头开始实现这一点
python permutation combinatorics
combinatorics ×1
permutation ×1
python ×1