摘要:Python中的is和==的区别 1. is 是比较内存地址id() 1 a = "YongJie" 2 3 b = "YongJie" 4 5 print(id(a)) #2331684108696,a的内存地址 6 7 print(a is b) #判断a的内存地址是否等于b 8 9 True 阅读全文
posted @ 2019-11-04 17:32 YJ-TX 阅读(186) 评论(0) 推荐(0) 编辑