[ Web Proxy ]
URL:
Viewing: https://mofanpy.com/tutorials/python-basic/basic/if [Back]  [Original]

if | Python if [if ]

x AI


if

: : : 2016-01-01

Python if, if else if elif if

if

if condition: expressions

condition True, expressions

x = 1 y = 2 z = 3 if x < y: print('x is less than y')

if x < y True, x is less than y

if x < y < z: print('x is less than y, and y is less than z')

x < y < z, x < y and y < z, and True True python

python == =,

x = 1 y = 2 z = 3 if x = y: print('x is equal to y')

C/C++

x = 2 y = 2 z = 0 if x == y: print('x is equal to y')

x y 2, x is equal to y


:

""

wechat [wechat]
    []

    Python

    :



    Email: mofanpy@hotmail.com

    © 2022 mofanpy.com All Rights Reserved ICP20060366


    Web Proxy Viewer  |  New URL  |  Original Page