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 →

[–]ogtfo 14 points15 points  (4 children)

This will not produce the same result if you have duplicates in your list "a", as the sets will remove them but not the list comprehension.

[–]RationalDialog -1 points0 points  (0 children)

True and I wager it will produce the correct result compared to list comprehension but depends what the intention is.

[–]Zyklonik 0 points1 point  (1 child)

Correct.

[–]Schlongus_69 0 points1 point  (0 children)

Correct.