Set Methods

 0    18 fiche    sir
ladda ner mp3 skriva ut spela Kontrollera dig själv
 
Fråga Svar
Returns a set, that is the intersection of two other sets.
börja lära sig
. intersection() / &
Removes the items in this set that are not present in other, specified set(s).
börja lära sig
. intersection_update() / &=
Returns a set containing the union of sets
börja lära sig
. union() / |
Update the set with the union of this set and others
börja lära sig
. update() / |=
Returns a set containing the difference between two or more sets.
börja lära sig
. difference() / -
Removes the items in this set that are also included in another, specified set.
börja lära sig
. difference_update() / -=
Returns a set with the symmetric differences of two sets
börja lära sig
. symmetric_difference() / ^
Inserts the symmetric differences from this set and another
börja lära sig
. symmetric_difference_update() / ^=
Returns a copy of the set.
börja lära sig
. copy()
Removes all the elements from the set.
börja lära sig
. clear()
Adds an element to the set.
börja lära sig
. add()
Removes the specified element.
börja lära sig
. remove()
Remove the specified item.
börja lära sig
. discard()
Removes an element from the set
börja lära sig
. pop()
Returns whether two sets have a intersection or not.
börja lära sig
. isdisjoint()
Returns whether another set contains this set or not.
börja lära sig
. issubset()
Returns whether this set contains another set or not.
börja lära sig
. issuperset()
Returns the length of a set. (Inner method.)
börja lära sig
. __len__

Du måste vara inloggad för att skriva en kommentar.