检查列表是否为空的最好方法 rank ▲ ✰ vote url 15 789 144 1269 url 检查列表是否为空的最好方法例如,传递下面: a = []我怎么检查a是空值? if not a: print "List is empty" 用隐藏的空列表的布尔值才是最Pythonic的方法.