SHARE
TWEET

Untitled

a guest Oct 15th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top