diff --git a/native-datatypes.html b/native-datatypes.html index e09a740..b746cef 100755 --- a/native-datatypes.html +++ b/native-datatypes.html @@ -634,7 +634,7 @@ AttributeError: 'tuple' object has no attribute 'remove'
update() method takes one argument, a set, and adds all its members to the original set. It’s as if you called the add() method with each member of the set.
update() method with any number of arguments. When called with two sets, the update() method adds all the members of each set to the original set (dropping duplicates).
-update() method can take a number of different datatypes, including lists. When called with a list, the update() method adds all the items of the list to the original set.
+update() method can take objects of a number of different datatypes, including lists. When called with a list, the update() method adds all the items of the list to the original set.
pop() method removes a single value from a set a returns the value. However, since sets are unordered, there is no “last” value in a set, so there is no way to control which value gets removed. It is essentially random.
+pop() method removes a single value from a set and returns the value. However, since sets are unordered, there is no “last” value in a set, so there is no way to control which value gets removed. It is essentially random.
clear() method removes all values from a set, leaving you with an empty set. This is equivalent to a_set = set(), which would create a new empty set and overwrite the previous value of the a_set variable.
KeyError exception.
in operator. This works the same as lists.
+in operator. This works the same as lists.
union() method returns a new set containing all the elements that are in either set.
intersection() method returns a new set containing all the elements that are in both sets.
difference() method returns a new set containing all the elements that are in a_set but not b_set.