标签:pre class highlight 嵌套 思路 int log mac [1]
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)]
标签:pre class highlight 嵌套 思路 int log mac [1]
原文地址:http://www.cnblogs.com/darkalex001/p/7497269.html