Created
December 9, 2019 17:13
-
-
Save elmoiv/81df6a7835861903b595756ef1bffda5 to your computer and use it in GitHub Desktop.
[Python Tricks #2] Check if 2 numbers are equal without ==.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_equal = lambda a, b: not a ^ b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment