在Python中怎么表达True
为False的几种情况0为False,其他所有数值皆为True空串("")为False,其他所有字符串皆为True空list([])为False,其他所有list皆为True空tuple(())为False,其他所有tuple皆为True空dict({})为False,其他所有dcit皆为True杜绝的几种写法if i==0:
if str==“”:
if list == None:
if set is None:
if dict == None:
优雅写法对应上面的例子
if not i:
if not str:
if not list:
if not set:
if not dicte:
from:jihite