我有一个有时会返回NoneType值的方法.那么如何质疑一个NoneType变量呢?例如,我需要使用if方法
if not new: new = '#'
我知道这是错误的方式,我希望你明白我的意思.
python nonetype
nonetype ×1
python ×1