Shouldn't the below lambda expression return a list? Currently, it isn't.
>>> f=lambda l ,x:l.append(x)
>>> print f(,3)
append is a side-effecting function; it appends a value to an existing list without returning a value (or None, depending on how you want to think of it).
Perhaps you want:
lambda l, x: l + [x]
This creates a new list from the existing list with an element appended at the end.