def test(): a = "" return a or "hehe" #如果a为真,输出a; 否则输出右边(比如0, "", [], ()) #return a or Noneprint(test())https://www.cnblogs.com/zealousness/p/8749152.html