Have a look at itertools.combinations: itertools.combinations(iterable, r) ... So, if the input iterable is sorted, the combination tuples will be produced ...
確定! 回上一頁