if x is not None 是最好的写法,清晰,不会出现错误,以后坚持使用这种写法。 使用 if not x 这种写法的前提是:必须清楚x等于None, False, 空字符串"", ...
確定! 回上一頁