What is the difference between “ is None ” and “ ==None ”

后端 未结 5 962
无人共我
无人共我 2020-11-22 11:33

I recently came across this syntax, I am unaware of the difference.

I would appreciate it if someone could tell me the difference.

5条回答
  •  一生所求
    2020-11-22 12:01

    If you use numpy,

    if np.zeros(3)==None: pass
    

    will give you error when numpy does elementwise comparison

提交回复
热议问题