Python None 陷阱
None < 0 >>TRUE None<[] >>TRUE None<{} >>TRUE
首先,在Python3中,已经不允许跨类型比较了。
None is the "lowest type" in Python 2, so None is always lower than any int which is always lower than any str etc在Python2中,None < int < str 。

浙公网安备 33010602011771号