【发布时间】:2012-05-11 04:18:15
【问题描述】:
我想知道 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