if no 和 if not
x = None if x is not None: print("kong") if not x is not None: print("kong")
# if not XXX就是 = if XXX ==0
# if XXX 就是= if XXX !=0
暂且只能这么理解 if x is not None
if x is not None
时来天地皆同力,运去英雄不自由
x = None if x is not None: print("kong") if not x is not None: print("kong")
# if not XXX就是 = if XXX ==0
# if XXX 就是= if XXX !=0
暂且只能这么理解 if x is not None
if x is not None