Set Methods

 0    18 speciālā zīme    sir
lejupielādēt mp3 Drukāt spēlēt pārbaudiet sevi
 
jautājums atbilde
Returns a set, that is the intersection of two other sets.
sākt mācīties
. intersection() / &
Removes the items in this set that are not present in other, specified set(s).
sākt mācīties
. intersection_update() / &=
Returns a set containing the union of sets
sākt mācīties
. union() / |
Update the set with the union of this set and others
sākt mācīties
. update() / |=
Returns a set containing the difference between two or more sets.
sākt mācīties
. difference() / -
Removes the items in this set that are also included in another, specified set.
sākt mācīties
. difference_update() / -=
Returns a set with the symmetric differences of two sets
sākt mācīties
. symmetric_difference() / ^
Inserts the symmetric differences from this set and another
sākt mācīties
. symmetric_difference_update() / ^=
Returns a copy of the set.
sākt mācīties
. copy()
Removes all the elements from the set.
sākt mācīties
. clear()
Adds an element to the set.
sākt mācīties
. add()
Removes the specified element.
sākt mācīties
. remove()
Remove the specified item.
sākt mācīties
. discard()
Removes an element from the set
sākt mācīties
. pop()
Returns whether two sets have a intersection or not.
sākt mācīties
. isdisjoint()
Returns whether another set contains this set or not.
sākt mācīties
. issubset()
Returns whether this set contains another set or not.
sākt mācīties
. issuperset()
Returns the length of a set. (Inner method.)
sākt mācīties
. __len__

Lai ievietotu komentāru, jums jāpiesakās.