Python Breaking Out Of For Loops Java