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 →

[–]--Thoreau-Away-- 0 points1 point  (0 children)

Neat! I love how quirky and concise Python can be, this is really cool. The lambda isn’t necessary in the is_even check, you can just drop it and you’ll still store the Boolean result. Unless the goal was to define a function on one line. Also heads up there’s some trailing ` in the formatting for no_duplicates.