1. The core of each if statement is an expression with a value of true or false, which is called a conditional test
2. An equal sign is a statement, two equals is a question, check if the case is not considered equal
Car = ' BMW '
Car = = ' Audi '
FALSE
3. Most conditional expressions written check that two values are equal, but sometimes it is more efficient to check whether two values are unequal
4. Fruits = [' apple ', ' orange ', ' banana ']
' Apple ' in fruits
True
5. In the IF statement, the indentation is the same as in the For loop
6. The IF-ELIF-ELSE structure is powerful, but only suitable for situations where only one condition is satisfied, in short, if you want to execute only one block of code, use the IF-ELIF-ELSE structure, and if you want to run multiple blocks of code, use a series of independent if statements
7. current_users=[' Houbashu ', ' admin ', ' root ', ' Gaoyang '
new_users=[' Houbashu ', ' Mengqi ']
For user in New_users:
If user in Current_users:
Print ("repeat")
Else
Print ("new")
Python the fourth time----if statement