python break nested for loops