📅  最后修改于: 2022-03-11 14:45:08.886000             🧑  作者: Mango
all_combinations = []
import itertools
for r in range(len(a_list) + 1):
combinations_object = itertools.combinations(a_list, r)
combinations_list = list(combinations_object)
all_combinations += combinations_list