Set Methods

 0    18 fiche    sir
laste ned mp3 Skriv ut spille sjekk deg selv
 
spørsmålet svaret
Returns a set, that is the intersection of two other sets.
begynn å lære
. intersection() / &
Removes the items in this set that are not present in other, specified set(s).
begynn å lære
. intersection_update() / &=
Returns a set containing the union of sets
begynn å lære
. union() / |
Update the set with the union of this set and others
begynn å lære
. update() / |=
Returns a set containing the difference between two or more sets.
begynn å lære
. difference() / -
Removes the items in this set that are also included in another, specified set.
begynn å lære
. difference_update() / -=
Returns a set with the symmetric differences of two sets
begynn å lære
. symmetric_difference() / ^
Inserts the symmetric differences from this set and another
begynn å lære
. symmetric_difference_update() / ^=
Returns a copy of the set.
begynn å lære
. copy()
Removes all the elements from the set.
begynn å lære
. clear()
Adds an element to the set.
begynn å lære
. add()
Removes the specified element.
begynn å lære
. remove()
Remove the specified item.
begynn å lære
. discard()
Removes an element from the set
begynn å lære
. pop()
Returns whether two sets have a intersection or not.
begynn å lære
. isdisjoint()
Returns whether another set contains this set or not.
begynn å lære
. issubset()
Returns whether this set contains another set or not.
begynn å lære
. issuperset()
Returns the length of a set. (Inner method.)
begynn å lære
. __len__

Du må logge inn for å legge inn en kommentar.