 Hi everyone! In this tutorial we're going to talk about the break statement in Python. Sometimes we may want to interrupt the loop, to start a new iteration or to simply end the loop. In these cases we're going to use the break statement. The break statement is used to break out of a loop. So if we want to break out of a loop, the first thing what we need to do is that we're going to add a break statement to the code block of a loop. We're going to use while loop or maybe for loop and the second thing is when the loop is executed and when break statement is true, the current loop iteration is stopped and the loop is executed. Here we're having simple while loop with condition 1. That condition 1 is true and inside this while loop we have code block. That code block keeps looping while our condition 1 is true and then we're having one or more statements outside of our while loop. So in order to break out of a loop at some point of time we need to have a break statement. In this example here is our break statement and we can have statements in our code block before this break statement and after this break statement we can have one or more statements. If at some point of time condition 2 is true in our break statement then all statements after this break statement are not going to be executed but instead loop is going to exit and when loop is exited then our program is going to keep executing statements that are outside of this while loop. I'm gonna make one simple example to show you the usage of the break statement. In this Python IDLE I'm gonna create a simple function that's going to find square roots of numbers in a loop and then we can break out of that loop at any point of time because I'm gonna work with square roots. I'm going to import mat module with import mat and then I'm going to create a function. I'm gonna call it square root loop for example then I'm going to make one while loop with condition which is always true. These loops are called infinite loops. You can find more about infinite loops on the video on my channel dedicated to this topic. I'm going to put link of this video in the description down below. Then we have while loop with condition which is true and then we're going to get a number from the input. I'm going to use input function. We're going to read a string from standard input. I'm gonna say for example enter a number and then we're going to cast that string to a float because we need to get float number and if our number is less than zero we know that we can't find square root of negative number so we're going to break out of our while statement but in the case that our number is positive we're going to print the square root of this number. I'm going to call square root function from mat module. Now I'm going to call this square root loop function and here we have an infinite loop. This loop is going to loop forever or until we provide a negative number with which we're going to break out of the loop. For example first I'm going to enter number let's say number 2 square root of number 2 is 1.41 and so on. Now I'm going to enter number 4 square root of number 4 is 2 square root of for example 100 is 10 and so on but in the case when I'm going to provide a negative number then our infinite loop is going to be finished with our break statement. I hope so that you understand the concept of the break statement and that this example is not very hard. That's all in this video don't forget to subscribe to my channel. Thanks for watching!