1.定义print_list,变量x
2.inside that function,print out each element one by one
3.then call your function with the argument n
系统生成码
n = [3,5,7]
for i in range(0,len(n))
print n[i]
这是系统给的例子
def print_list(x):
for i in range(0,len(x)):
print x[i]
print print_list(n)
Hint
You can simply place the code on lines3-4 inside a function definition.Make sure to indent properly!And you'll have to change the n to x