Skip to content

Instantly share code, notes, and snippets.

@Jonty
Forked from ntlk/sort.py
Last active December 25, 2015 11:19
import sys
lines = sys.stdin.readlines()
lines.sort(reverse = ('-r' in sys.argv))
print ''.join(lines)
@ntlk
Copy link

ntlk commented Oct 13, 2013

Oh, I didn't know about sys.argv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment