Python not equal operator

后端 未结 4 1395
庸人自扰
庸人自扰 2020-11-30 14:56

I come from a c style languages, so I am natural in using != as not equal, but when I came to Python, from the documentation I read, I learned that for this pur

4条回答
  •  无人及你
    2020-11-30 15:25

    Python 2 supports both, in python 3 the <> operator has been removed.

    There is no difference between the two, but != is the preferred form.

提交回复
热议问题