tuplelist一样都属于序列,list的大部分操作都能支持操作tuple,除了修改和删除操作。

v = (10, 20, 30, 40)
print(v[0])
print(v[1:3])

v = (10, 20, 30, 40)
v[1] = 100    # 抛出异常

Copyright © 李振超 2018 all right reserved,powered by Gitbook
该文件最后修订时间: 2018-02-25 07:12:09

results matching ""

    No results matching ""