summaryrefslogtreecommitdiff
path: root/learning_python/mutable_params.py
blob: 6e2fdce035f06bbd9b0563d43b4048add8a6b06d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

def append_to(element, to=[]):
    to.append(element)
    return to


if __name__ == '__main__':

    my_list = append_to(12)
    print(my_list, append_to)

    my_other_list = append_to(42)
    print(my_other_list, append_to)