list=['P','y','t','h','o','n'] a=list[3] b=list[-4:] print(a,b,sep='\n')
列表:查找直接用下标,用中括号
切片[start,end],起始点到终点
暂无评论,快来抢首评~
相关推荐