Check http://docs.python.org/2/library/heapq.html#heapq.nlargest