例如,如果传递以下内容:
a = []
如何检查是否a为空?
a
python list
我想知道python是否有任何函数,如php空函数(http://php.net/manual/en/function.empty.php),它检查变量是否为空,符合以下条件
"" (an empty string) 0 (0 as an integer) 0.0 (0 as a float) "0" (0 as a string) NULL FALSE array() (an empty array)
python
python ×2
list ×1