Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strings = "alexis diaz".split()
- def mycmp(s1, s2):
- return cmp(len(s2), len(s1)) or cmp(s1.upper(), s2.upper())
- print sorted(strings, cmp=mycmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement