代碼
提交代碼
# 打印輸出列表 x 的相關信息
def print_list(x):
print('length of list is %d' % len(x))
i = 0
while i < len(x):
print(x[i])
i = i + 1
a = [1, 2, 3]
b = [10, 20, 30]
print_list(a)
print_list(b)
運行結果