From the title, you might think that I am some kind of a beginner who doesn’t understand programming and is trying to fool us. Well, I thought like that when I first learn how to write code without the else statement. Believe me, I don’t have anything against the if..then..else statement. They are probably the most powerful concept of any programming language because they give computers the thinking power.
Now, let us try to write code without the else statement. First, we will write the binary search algorithm with the else group and change the code to run without the else code.

As you saw above, there is somewhat lots of nesting in this code and since we are writing in python we are not irritated but if we wrote this program in other languages like C or C++, we will have lots of nesting and the code is not nice at all. It is very difficult to understand the code also. For this program, this nesting may not seem to be a program but when the program gets really big, it is really difficult to understand and the code is also very messy.
Here is the code without using else statement.

As you can see, the code is much cleaner and we can understand it better. The difference is very clear and you can see it yourself. So think carefully when writing your program.