Python Nested If Statements

In python if..elif..else statements inside another if..elif..else statements.is called nesting if in python programming.The following syntax and example of nested if.

Syntax

							
if test expression
	if test expression:
		body of if
	else:
		body of else
else:
	body of if
	
							
	
							
							

Example

							
= 0:
	if a == 0:
		print("Zero");
	else:
		print("Positive");
else:
	print("Negative");
		
							
							

You may also like this!