Sort at various levels in Python,"top_n.sort(key=lambda t: (-t[1], t[0]))"