验证python中“=”对对象的引用,点型案例
更新:HHH   时间:2023-1-7


python添加[],h[0]添加10,h添加10 验证python中"="对对象的引用

h = [[]] * 5

print(h)

h[0].append(10)

print(h)

h[0].append(10)

print(h)

h.append(20)

print(h)

运行结果如下:

返回编程语言教程...