YUX
V2EX  ›  问与答

Python 里的 if f(x) and g(x): 这句, 若 f(x)为 False,还会计算 g(x)么?

  •  
  •   YUX · Mar 28, 2020 · 1286 views
    This topic created in 2429 days ago, the information mentioned may be changed or developed.

    如果 python 里的 if f(x) and g(x): 这句, 若 f(x)为 False,还会计算 g(x)么?

    Trim21
    Trim21
    Mar 28, 2020
    1
    python -c '0 and print(233)'
    不会
    jingniao
    jingniao
    Mar 28, 2020 via iPhone
    2
    哪个语言 or and 是计算全部?
    Muninn
    Muninn
    Mar 28, 2020
    3
    我会的语言都不会
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1871 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 05:42 · PVG 13:42 · LAX 21:42 · JFK 00:42
    ♥ Do have faith in what you're doing.