As one might need default parameters in python functions, such as

def func(inp = []):
    inp.append(1)
    return inp

they might cause trouble. Python functions are objects of a certain identity. Everytime you run it, the input inp changes. The consequence is that the function returns different results.

A better strategy is to use None. Here is an example:

def func(inp = None):

    if inp is None:
       inp = []

    return inp

For references, please read: Default Parameter Values in Python.