Share your repls and programming experiences

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

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

Commentshotnewtop
TheDrone7 (1051)

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

DynamicSquid (2650)

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 (3291)

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

DynamicSquid (2650)

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

PYer (3291)

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

DynamicSquid (2650)

@PYer it doesn't? worked fine for me