Source Code:
(back to article)
def append_to_list(value, lst=None): if lst is None: lst = [] lst.append(value) return lst print(append_to_list(1)) print(append_to_list(2)) print(append_to_list(3))
Result:
Report an issue