l=list(range(5))
type(l)
l
t=tuple(range(5))
type(t)
t
l[1]=9
t[1]=9 error
l.append(2)
t.append(2) error
tuple 不支持原位改变
通过上边的语句来区分list与tuple的区别
python 区分大小写
转载于:https://blog.51cto.com/chinaji/1890867
l=list(range(5))
type(l)
l
t=tuple(range(5))
type(t)
t
l[1]=9
t[1]=9 error
l.append(2)
t.append(2) error
tuple 不支持原位改变
通过上边的语句来区分list与tuple的区别
python 区分大小写
转载于:https://blog.51cto.com/chinaji/1890867