摘要: 判断是否为None的情况 if not x if x is None if not x is None if x is not None`是最好的写法,清晰,不会出现错误,以后坚持使用这种写法。 使用if not x这种写法的前提是:必须清楚x等于None, False, 空字符串"", 0, 空列 阅读全文
posted @ 2019-01-12 17:56 joneylulu 阅读(228) 评论(0) 推荐(0) 编辑