for i in xrange(len(offsets)): if offsets[i][0] >= 0: break if i > 0: max_negative = offsets[0][0] offsets = offsets[i:]