# -*- coding: utf-8 -*-
L = [
['Apple', 'Google', 'Microsoft'],
['Java', 'Python', 'Ruby', 'PHP'],
['Adam', 'Bart', 'Lisa']
]
print(len(L))
print(L[0][0])
print(L[1][1])
print(L[2][2])
print(L[2][-1])
结果:
f:/work/L1_3.py
3
Apple
Python
Lisa
Sign in to make a reply
梁
# -*- coding: utf-8 -*-
L = [
['Apple', 'Google', 'Microsoft'],
['Java', 'Python', 'Ruby', 'PHP'],
['Adam', 'Bart', 'Lisa']
]
print(len(L))
print(L[0][0])
print(L[1][1])
print(L[2][2])
print(L[2][-1])
结果:
f:/work/L1_3.py
3
Apple
Python
Lisa
Lisa