def test(): a = "" return a or "hehe" #如果a为真,输出a; 否则输出右边(比如0, "", [], ()) #return a or Noneprint(test())https://www.cnblogs.com/zealousness/p/8749152.html
python ruturn中的and与or.
原文:https://www.cnblogs.com/Stephen-Qin/p/10834530.html