Skip to content

Commit 0bbfae3

Browse files
committed
Merge rephrasing with 3.2.
2 parents fc1a636 + 89b03b0 commit 0bbfae3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/tutorial/datastructures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ with no duplicate elements. Basic uses include membership testing and
418418
eliminating duplicate entries. Set objects also support mathematical operations
419419
like union, intersection, difference, and symmetric difference.
420420

421-
Curly braces or the :func:`set` function can be used to create sets. Note: To
421+
Curly braces or the :func:`set` function can be used to create sets. Note: to
422422
create an empty set you have to use ``set()``, not ``{}``; the latter creates an
423423
empty dictionary, a data structure that we discuss in the next section.
424424

@@ -447,14 +447,14 @@ Here is a brief demonstration::
447447
>>> a ^ b # letters in a or b but not both
448448
{'r', 'd', 'b', 'm', 'z', 'l'}
449449

450-
Like :ref:`for lists <tut-listcomps>`, there is a set comprehension syntax::
450+
Similarly to :ref:`list comprehensions <tut-listcomps>`, set comprehensions
451+
are also supported::
451452

452453
>>> a = {x for x in 'abracadabra' if x not in 'abc'}
453454
>>> a
454455
{'r', 'd'}
455456

456457

457-
458458
.. _tut-dictionaries:
459459

460460
Dictionaries

0 commit comments

Comments
 (0)