print(L[0][0])
print(L[1][1])
print(L[2][2])
不可变的tuple有什么意义?因为tuple不可变,所以代码更安全。如果可能,能用tuple代替list就尽量用tuple。
Sign in to make a reply
七月上行
打印Apple:
print(L[0][0])
打印Python:
print(L[1][1])
打印Lisa:
print(L[2][2])