Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. strings = "alexis diaz".split()
  2. def mycmp(s1, s2):
  3. return cmp(len(s2), len(s1)) or cmp(s1.upper(), s2.upper())
  4.  
  5. print sorted(strings, cmp=mycmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement