PythiloMedium · 25 min · Task 75 of 100 · progress kept in this browser

Distinct subsets with duplicates

Return all distinct subsets of an integer list as sorted lists, with the collection in lexicographic order.

values = [1, 2, 2]
start = 1
for i in range(start, len(values)):
    print(i, i > start and values[i] == values[i-1])
Your task

Return all distinct subsets of an integer list as sorted lists, with the collection in lexicographic order.