代码
提交代码
# 打印输出列表 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)
运行结果