Discuss / Python / 学习速度有点慢,记录下

学习速度有点慢,记录下

Topic source

哎呀博雅

#1 Created at ... [Delete] [Delete and Lock User]
L = [
    ['Apple', 'Google', 'Microsoft'],
    ['Java', 'Python', 'Ruby', 'PHP'],
    ['Adam', 'Bart', 'Lisa']
]
# 打印Apple:
print(L[0][0])
# 打印Python:
print(L[1][1])
# 打印Lisa:
print(L[2][2])

>>>
Apple
Python
Lisa

思考:这个列表&元组和其他代码中的枚举是一回事吗


  • 1

Reply