Skip to content

Commit bb74489

Browse files
committed
Update funcWithSetsAndDict.rst
fixed some wording
1 parent b387ad8 commit bb74489

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

_sources/functions/funcWithSetsAndDict.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ Set Methods
180180
==============
181181
You can use the following methods with sets.
182182

183-
* set1.union(other_set) - returns a new set with all the items from each of the sets
184-
* set1.intersection(other_set) - returns a new set with just the items that are in both sets
185-
* set1.difference(other_set) - returns a new set with the items in the first set that are not in the second set
186-
* set1.issubset(other_set) - returns True if the set is a subset of the other set
187-
* set1.issuperset(other_set) - returns True if the set is a superset of the other set
188-
* set1.semmantic_difference(other_set) - returns a new set with the items that are in either set, but not both. This is also known as an exclusive or (XOR).
183+
* set1.union(other_set) - returns a new set with all the items from ``set1`` and ``other_set``.
184+
* set1.intersection(other_set) - returns a new set with just the items that are in both ``set1`` and ``other_set``.
185+
* set1.difference(other_set) - returns a new set with the items in ``set1`` that are not in ``other_set``.
186+
* set1.issubset(other_set) - returns True if ``set1`` is a subset (has some of the same elements and no other elements) of ``other_set``.
187+
* set1.issuperset(other_set) - returns True if set1 is a superset (has all the same elments and may have other elements) of ``other_set``.
188+
* set1.semmantic_difference(other_set) - returns a new set with the items that are in either ``set1`` or ``other_set``, but not both. This is also known as an exclusive or (XOR).
189189

190190
.. activecode:: func_set_union_int_ac
191191
:caption: Set methods
@@ -205,9 +205,9 @@ You can use the following methods with sets.
205205
.. fillintheblank:: funct_set_union_fitb
206206
:practice: T
207207

208-
What character can be used to indicate the union of two sets as shown in the code above?
208+
What character can be used to get the union of two sets as shown in the code above?
209209

210-
- :\|: Use a pipe to indicate the union of two sets.
210+
- :\|: Use a pipe to get the union of two sets.
211211
:.*: Which gives the same output as the union method?
212212

213213
.. activecode:: func_set_diff_sub_ac
@@ -232,9 +232,9 @@ You can use the following methods with sets.
232232
.. fillintheblank:: funct_set_diff_fitb
233233
:practice: T
234234

235-
What character is used to indicate the difference between two sets in the code above?
235+
What character is used to get the difference between two sets in the code above?
236236

237-
- :\-: Use a dash to indicate the difference between two sets.
237+
- :\-: Use a dash to get the difference between two sets.
238238
:.*: Which gives the same output as the difference method?
239239

240240
.. activecode:: func_set_super_exor_ac
@@ -258,7 +258,7 @@ You can use the following methods with sets.
258258

259259
What character is used to find the symmetric difference (exlusive or) between two sets in the code above?
260260

261-
- :\^: Use a ^ to indicate the symmetric difference between two sets (exclusive or)
261+
- :\^: Use a ^ to get the symmetric difference between two sets (exclusive or)
262262
:.*: Which gives the same output as the symmetric_difference method?
263263

264264
.. dragndrop:: funct_set_methods_dnd

0 commit comments

Comments
 (0)