小编krk*_*krk的帖子

为什么'list is list(list)'在python中是假的?

num = [1,2,3,4]
num == list(num) 
Run Code Online (Sandbox Code Playgroud)

它给出True,其中,

num is list(num)
Run Code Online (Sandbox Code Playgroud)

给出False

这两者有什么区别?python在这两个语句中做了什么?

python identity list python-3.x

1
推荐指数
1
解决办法
1408
查看次数

标签 统计

identity ×1

list ×1

python ×1

python-3.x ×1