Kapatera (Set)

class mochila.Set(iterable=())

A Set is a collection of items. The order in which the items appear in the collection is irrelevant and the same item can appear only once in the collection. Items in the collection must be hashable.

A Set behaves as the Python built-in set type. The main difference is that the non-operator versions of the update(), intersection_update(), difference_update(), and symmetric_difference_update() are not supported.

Sets can be constructed using the type constructor Set() or Set(iterable). The constructor builds a Set whose items are taken from iterable. To represent sets of sets, the inner sets must be frozenset objects. If iterable is not specified, a new empty Set is returned.

Parameters:iterable – An iterable from which items are taken to build the Set.