python中对变量判断是否为None的三种方法

1) if a is None:

2)if not a:

3)if not (a is None):

猜你喜欢

转载自blog.csdn.net/sinat_35853898/article/details/79734753