I'm trying to write a quite big recursive function, but the baseline is the following: def rek(N, L): N = N + 1 if N >= 9: return L else: return rek(N, L = L.append(N)) print rek(0, []) Why isn't this working? In my opinion it should return [1, 2, ..., 9] Thanks for any answers. Dominik