Is there a standard way to represent a \"set\" that can contain duplicate elements.
As I understand it, a set has exactly one or zero of an element. I want functiona
Your approach with dict with element/count seems ok to me. You probably need some more functionality. Have a look at collections.Counter.
element in list and list.count(element))counter.elements() looks like a list with all duplicates