Skip to content

Instantly share code, notes, and snippets.

@stesh
Created April 20, 2011 10:08
Show Gist options
  • Save stesh/930916 to your computer and use it in GitHub Desktop.
Save stesh/930916 to your computer and use it in GitHub Desktop.
q = lambda l : l if len(l) <= 1 else (q([x for x in l[1:] if x < l[0]]) + [l[0]] + q([x for x in l[1:] if x >= l[0]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment