Python Control Statements

As mentioned earlier, Python uses indentation to identify the block of statements.

if statement

if condition:
        statements for condition true      
nType = 0
if nType == 0:
        sType = "Body"

else statement

if condition:
        statements for condition true
else:
        statements for condition false
nType = 0
if nType == 0:
	sType = "Body"
else:
	sType = "Face"

else if statement

if condition1:
	statements for condition1 true
elif condition2:
	statements for condition2 true
else:
	statements for condition false
nType = 0
if nType == 0:
	sType = "Body"
elif nType == 1:
	sType = "Face"
else:
	sType = "Edge"