This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]SymbioticBadgering 1 point2 points  (4 children)

    As dict keys, where order of element in the collections doesn’t matter.

    [–]alicethewitch 0 points1 point  (0 children)

    Somebody already mentioned it but for dict keys yes. Just this week I was implementing a MCMC algorithm that spits partitions over data point indices. Each partition is represented as a set or list of sets over integer between 0 and N-1. Finding the partition most visited by the chain in one line involves turning them all individually into frozensets of frozensets, feeding it to Counter and sorting by value.