a=100 b=50 c=a if b is None else b print(c) #输出结果为50,这段代码相当于 if b is None: c = a else: c = b