-
-
Save ibeauregard/1dcd5e8b634b89c14e1ef04e6f1e6589 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 order_by(rows, key): | |
rows.sort(key=lambda row: converted(row[key.index]), | |
reverse=not key.ascending) | |
return rows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment