Lookup loop exhausts connections

Code reviewMedium22 min

Your task

Review this Python function that runs many independent lookups in a loop.