i'm trying to figure out how i can identify which objects are a subset/superset within the list that holds them. and thereby remove them from the list.
if i have list a = [ {'john-123'}, {'john-123','john-234'}, {'john-123','john-234','johnnybegood'} ] the first two are subsets of the last one.
i've found a lot about comparing two different sets, but not sure how to implement that into an iteration
i've tried something like this:
for j in a: frequency = sum(j.issubset(b) for b in a) print(frequency) but no dice
a = [{1}, {1,2}, {1}]a possible input to your problem?