Loop in Py
Loop in Py
of Flow
if Statements
if x == 3:
print “X equals 3.”
elif x == 2:
print “X equals 2.”
else:
print “X equals something else.”
print “This is outside the ‘if’.”
>>>
break and continue
You can use the keyword break inside a
loop to leave the while loop entirely.