def append_x(x, a=None, b=None, c=[]):
a = a or []
b = b if b is not None else []
a.append(x)
b.append(x)
c.append(x)
print(a, b, c)
s, t, u = [], [], []
append_x(1)
append_x(2, s, t)
append_x(3, s, t, u)
print(s, t, u)
Item 4: Default Arguments
Posted by Logan Chien