Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89b03b0

Browse files
committed
Rephrase a sentence in the set and dict comprehensions tutorial page.
1 parent e4b8639 commit 89b03b0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/tutorial/datastructures.rst

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

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

@@ -442,14 +442,14 @@ Here is a brief demonstration::
442442
>>> a ^ b # letters in a or b but not both
443443
{'r', 'd', 'b', 'm', 'z', 'l'}
444444

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

447448
>>> a = {x for x in 'abracadabra' if x not in 'abc'}
448449
>>> a
449450
{'r', 'd'}
450451

451452

452-
453453
.. _tut-dictionaries:
454454

455455
Dictionaries

0 commit comments

Comments
 (0)