python nested for loop continue outer loop