为什么在Python 2 中4 < '3'返回True?
4 < '3'
True
是因为当我在一个数字周围放置单引号时,Python认为它是一个字符串,字符串比数字大吗?
python comparison operators python-2.x
comparison ×1
operators ×1
python ×1
python-2.x ×1