Florian Lindner <Florian.Lindner at xgm.de> writes: > What possible you see to optimize this lookup? Or anything else you see to > make it better? Use the heapq module.