python判断字符串或者集合是否为空

最近在看《Effective Python》,里面提到判断字符串或者集合是否为空的原则,原文以下:python Don’t check for empty values (like [] or '') by checking the length (if len(somelist) == 0). Use if not somelist and assume empty values implici
相关文章
相关标签/搜索