English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Set est une collection non ordonnée d'éléments. Les éléments du Set sont uniques et immuables. Sur cette page de référence, vous trouverez toutes les méthodes disponibles pour l'objet set.
Méthode | Description |
---|---|
add() | Ajoutez des éléments à la collection. |
clear() | Supprime tous les éléments de la collection. |
copy() | Retourne une copie de la collection. |
difference() | Retourne une collection contenant les différences entre deux ou plusieurs collections. |
difference_update() | Supprimez les éléments qui sont présents dans une autre collection spécifiée. |
discard() | Delete the specified item. |
intersection() | Return a set that is the intersection of two other sets. |
intersection_update() | Delete items that do not exist in other specified sets from this set. |
isdisjoint() | Return whether two sets have an intersection. |
issubset() | Return whether another set contains this set. |
issuperset() | Return whether this set contains another set. |
pop() | Delete an element from the set. |
remove() | Delete the specified element. |
symmetric_difference() | Return a set containing the symmetric difference of two sets. |
symmetric_difference_update() | Insert the symmetric difference of this set and another set. |
union() | Return a set containing the union of sets. |
update() | Update the set with the union of this set and other sets. |
in our Python set tutorial Learn more about sets on our