1.0 思路
1.1 列表嵌套
# name1 = [‘mac‘,‘book‘,‘bike‘,‘kindle‘] a = [[1,2,3],‘alex‘,(2,3,4)] print(a[0]) #>>>[1, 2, 3] print(a[0][1]) #>>>2 a[0][2] = 4 print(a) #>>>[[1, 2, 4], ‘alex‘, (2, 3, 4)]
时间: 2024-10-13 19:00:41
1.0 思路
1.1 列表嵌套
# name1 = [‘mac‘,‘book‘,‘bike‘,‘kindle‘] a = [[1,2,3],‘alex‘,(2,3,4)] print(a[0]) #>>>[1, 2, 3] print(a[0][1]) #>>>2 a[0][2] = 4 print(a) #>>>[[1, 2, 4], ‘alex‘, (2, 3, 4)]