1. list 脚标

li = [1,2,3,[1,2,['ab','cd'],'wang'],'wo']
w = li[3][2][1][0]
print(w)
————————
c

2. list 循环

li = [1,2,3,[1,2,['ab','cd'],'wang'],'wo']

s = ''
for i in li:
    s += str(i)
print(s)
————————
123[1, 2, ['ab', 'cd'], 'wang']wo

  

posted on 2019-01-25 11:14  大叔学AI  阅读(104)  评论(0编辑  收藏  举报