如何在不使用not命令的情况下查明列表是否为空? 这是我尝试过的:
if list3[0] == []: print "No matches found" else: print list3
我是一个初学者,所以如果我犯了愚蠢的错误,请原谅.
python list is-empty
is-empty ×1
list ×1
python ×1