In programming, deep nesting is a problem known as the Arrow Anti-Pattern. The name comes from the shape of nested if statements:

if ...:
    if ...:
        if ...
            if ...
                if ...
                    # code
                else:
            else:
        else:
    else:
else:

Normally, you shouldn’t go beyond two levels of nesting. Otherwise, your code becomes overly complex and hard to understand.

Boolean operators allow us to combine multiple conditional expressions without relying on nested if statements.

I talk about the Arrow Anti-pattern and further, programming related topics in my recently published book The Non-Programmer’s Programming Book: Programming Foundations for Absolute Beginners. Learn to code from scratch with no prior experience. (Professional Skills Book 3), Karoly Nyisztor, eBook – Amazon.com