YUX
V2EX  ›  问与答

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

  •  
  •   YUX ·
    PRO
    · Mar 28, 2020 · 1213 views
    This topic created in 2341 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   ·   4015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:16 · PVG 18:16 · LAX 03:16 · JFK 06:16
    ♥ Do have faith in what you're doing.