【廖雪峰Python习题集】使用list和tuple

来源:互联网 发布:知乎 第三方存管账户 编辑:程序博客网 时间:2024/06/01 10:50
请用索引取出下面list的指定元素:
#_*_coding:utf-8_*_

L=[
['Apple',Google','Microsoft'],
['Java','Python','Ruby','PHP'],
['Adam','Bart','Lisa']
]

#_*_coding:utf-8_*_L = [[ 'Apple' , 'Google' , 'Microsoft'] ,[ 'Java' , 'Python' , 'Ruby' , 'PHP'] ,[ 'Adam' , 'Bart' , 'Lisa']]print('#打印Apple:')print(L[0][0])print('#打印Python:')print(L[1][1])print('#打印Lisa:')print(L[2][2])

显示结果如下图所示: