Set Methods

 0    18 fiche    sir
Télécharger mP3 Imprimer jouer consultez
 
question réponse
Returns a set, that is the intersection of two other sets.
commencer à apprendre
. intersection() / &
Removes the items in this set that are not present in other, specified set(s).
commencer à apprendre
. intersection_update() / &=
Returns a set containing the union of sets
commencer à apprendre
. union() / |
Update the set with the union of this set and others
commencer à apprendre
. update() / |=
Returns a set containing the difference between two or more sets.
commencer à apprendre
. difference() / -
Removes the items in this set that are also included in another, specified set.
commencer à apprendre
. difference_update() / -=
Returns a set with the symmetric differences of two sets
commencer à apprendre
. symmetric_difference() / ^
Inserts the symmetric differences from this set and another
commencer à apprendre
. symmetric_difference_update() / ^=
Returns a copy of the set.
commencer à apprendre
. copy()
Removes all the elements from the set.
commencer à apprendre
. clear()
Adds an element to the set.
commencer à apprendre
. add()
Removes the specified element.
commencer à apprendre
. remove()
Remove the specified item.
commencer à apprendre
. discard()
Removes an element from the set
commencer à apprendre
. pop()
Returns whether two sets have a intersection or not.
commencer à apprendre
. isdisjoint()
Returns whether another set contains this set or not.
commencer à apprendre
. issubset()
Returns whether this set contains another set or not.
commencer à apprendre
. issuperset()
Returns the length of a set. (Inner method.)
commencer à apprendre
. __len__

Vous devez vous connecter pour poster un commentaire.