<分区> 分区>
这是我的代码:
def list_test(foo):
bar = foo.append('w')
return bar
my_input = [7,8,9]
当我运行它时:
>>>print list_test(my_input)
None
打印输出 None。为什么?我该如何解决?
注意:我需要的输出是:7,8,9,'w'
谢谢。
<分区> 分区>
这是我的代码:
def list_test(foo):
bar = foo.append('w')
return bar
my_input = [7,8,9]
当我运行它时:
>>>print list_test(my_input)
None
打印输出 None。为什么?我该如何解决?
注意:我需要的输出是:7,8,9,'w'
谢谢。