Blog Content
python中Nonetype与空值
Python
2011-06-11 19:05:26
Nonetype:不存在此参数;
空值:参数存在,但值为空。
if a is None:
print ("no a,is nonetype")
elif a:
print ("a is not null")
else:
print (" a is null")
上一篇:python返回第一个最小的大于0的数
下一篇:python中字典转dataframe报错If using all scalar values, you must pass an index