for i in range(0, len(l)):
    while l[j] < 2 * l[i]:
        j += 1
if j == len(l):
    return -1
if l[j] == 2 * l[i]:
    return i
How to quickly find first multiple of 2 of list element in list of large integers?