Halo
发布于 2024-10-29 / 39 阅读 / 0 评论 / 0 点赞

== 和 is

a = 'hello world'
b = 'hello world'
a == b  #返回True 
a is b  #返回False 
  • is 判断是否是一个ID
  • == 判断内容是否相等

评论