bool(x) 如果x是真则返回True,否则返回False
In [184]: print bool(3), bool('a')
True True
In [185]: print bool(0), bool(''), bool(None)
False False False