Python Leave Loop Early August 13, 2023 by Tarik continue and break is what you want. Python works identically to Java/C++ in this regard.