summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristopher Lorton <github@lortons.net>2016-11-21 01:38:39 -0800
committerven <vendethiel@hotmail.fr>2016-11-21 10:38:39 +0100
commite25918acabcafc8f2e3bda35e8e28fa583cb70b9 (patch)
tree9a4a9f2c46deab38e17fbca857d233c3b19460f7
parentac99d3f1cba2d49a7b2560fe338f6a14044a6eaa (diff)
Fix comment in set comprehension example (#2580)
The result should be {'a', 'b', 'c'} (not {'d', 'e', 'f'}).
-rw-r--r--python.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 55f56071..050503c3 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -550,7 +550,7 @@ filter(lambda x: x > 5, [3, 4, 5, 6, 7]) # => [6, 7]
[x for x in [3, 4, 5, 6, 7] if x > 5] # => [6, 7]
# You can construct set and dict comprehensions as well.
-{x for x in 'abcddeef' if x in 'abc'} # => {'d', 'e', 'f'}
+{x for x in 'abcddeef' if x in 'abc'} # => {'a', 'b', 'c'}
{x: x**2 for x in range(5)} # => {0: 0, 1: 1, 2: 4, 3: 9, 4: 16}