感谢def good_append(new_item, a_list = None):
if a_list is None:
a_list = []
a_list.append(new_item)
return a_list
print(good_append('1'))
print(good_append('2'))
print(good_append('c', ['a', 'b']))def good_append(new_item, a_list = None):
if a_list is None:
a_list = []
a_list.append(new_item)
return a_list
print(good_append('1'))
print(good_append('2'))
print(good_append('c', ['a', 'b']))def good_append(new_item, a_list = None):
if a_list is None:
a_list = []
a_list.append(new_item)
return a_list
print(good_append('1'))
print(good_append('2'))
print(good_append('c', ['a', 'b'])) |