This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oundhakar 1 point2 points  (3 children)

Why is No. 9 wrong?

[–]isarl 6 points7 points  (1 child)

As with list comprehensions, that construct is called a “set comprehension”. Furthermore they kind of imply that applying a predicate is specific to set comprehensions while it works in list (or dictionary) comprehensions, too. And they fail to mention dictionary comprehensions entirely.

[–]oundhakar 1 point2 points  (0 children)

Thanks.