Today, let's talk about conditional judgment statements--if
The IF statement is used in Python to determine whether the given condition is satisfied, and one of the two actions given is determined by the result of the decision (true or false).
form of expression:
if (expression 1):
Statement 1
elif (expression 2):
Statement 2
elif (expression 3):
Statement 3
elif (expression m):
Statement m
Else
Statement n
Let's give an example:
If 2==3: print ("false") Elif 2<3: print ("true")
Output Result:
>>> ================================ RESTART ================================
>>>
True
>>>
This is the section here, thank you.
------------------------------------------------------------------
Click to jump 0 basic python-Catalogue
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
0 basic python-2.10 condition judgment if statement