Share your repls and programming experiences

← Back to all posts
#WEEKLY #5: Equality Check
PYer (3647)

This one uses the in keyword, which is not counted as an "operator" (unless this is incorrect please tell me @TheDrone7). Thanks!

EDIT: Loops to run multiple tests.
EDIT: Switched to a lambda function instead

Comments
hotnewtop
TheDrone7 (1649)

It's all valid, dw. Haven't scored yet tho.

DynamicSquid (4567)

Now that's crafty :) Should be fine since it's not a comparison operator. You could also do something similar with regex as well.

PYer (3647)

Yeah, i also did zip_longest with itertools and a combination of your strategy. i ended up just sticking with this though. @DynamicSquid

DynamicSquid (4567)

@PYer yeah, python has a lot of neat tricks that many other languages don't

PYer (3647)

oh wait, my thing doesn't work. i need to fix it. @DynamicSquid

DynamicSquid (4567)

@PYer it doesn't? worked fine for me