mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
markup fiddling
This commit is contained in:
+1
-1
@@ -334,7 +334,7 @@ body{counter-reset:h1 3}
|
||||
<samp class=pp>{32, 1, 2, 4, 8, 64, 128, 256, 16, 512}</samp>
|
||||
</pre>
|
||||
<ol>
|
||||
<li>Set comprehensions can take a set as input. This set comprehension calculates the squares of the set of numbers from <code>0</code> to <code>9</code>.
|
||||
<li>Set comprehensions can take a set as input. This set comprehension calculates the squares of the set of numbers from 0 to <code>9</code>.
|
||||
<li>Like list comprehensions and dictionary comprehensions, set comprehensions can contain an <code>if</code> clause to filter each item before returning it in the result set.
|
||||
<li>Set comprehensions do not need to take a set as input; they can take any sequence.
|
||||
</ol>
|
||||
|
||||
Reference in New Issue
Block a user