YUX
V2EX  ›  问与答

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

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

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

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