Python flow control nested if statement

The so-called nested if statement means that there are other if statements in the if statement. The following is an example of a situation.

For example: test whether a certain year is a leap year. The condition for a leap year is that it is first divisible by 4 (equivalent to no remainder). When this condition is established, it must be met when it is divided by 100 and the remainder is not 0 or divided by

The remainder of 400 is 0, and it is considered a leap year when both conditions are met.

Guess you like

Origin blog.csdn.net/m0_55389447/article/details/114726706