def findRange(value):
    for x in range(len(values)):
        if value >= values[x][0] and value < values[x][1]:
            matches.append([value, values[x]])

def main():
    t1 = time.process_time()
for y in possiblePositionMatches:
    findRange(y)
print(matches)
t2 = time.process_time() - t1
print('Total Time: {0} seconds'.format(t2))
main()
Fast lookup in list of intervals