标签:com lex 查询 div color for pen upper inf
#-*-coding:utf-8-*- ‘‘‘ 元组:只读列表,可循环查询,可切片 儿子不能改,孙子可能可以改 ‘‘‘ tu = (1,2,3,‘alex‘,[2,3,4,‘abnowen‘],‘encho‘) print(tu[3]) # alex print(tu[:4]) # (1, 2, 3, ‘alex‘) # 遍历 ‘‘‘1 2 3 alex [2, 3, 4, 5] encho‘‘‘ for i in tu: print(i) # 元组中的列表是可以修改的 tu[4][3] = tu[4][3].upper() print(tu[4]) # [2, 3, 4, ‘ABNOWEN‘] # 添加 tu[4].append(‘sb‘) print(tu[4]) # [2, 3, 4, ‘ABNOWEN‘, ‘sb‘]
标签:com lex 查询 div color for pen upper inf
原文地址:https://www.cnblogs.com/sunnybowen/p/10204864.html