-
-
Save brunobord/1099506 to your computer and use it in GitHub Desktop.
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
def _cmp(a, b): | |
# print a, b | |
if a == b: | |
return 0 | |
if a.startswith(b) == 0: | |
return 1 | |
else: | |
return -1 | |
# my CMP... Comparing the first letter is not enough, IMHO. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment