Just enclose the anonymous function with "(" and ")". Then you can use an anonymous function longer than one line.
>>> f = lambda x: (x
* x
* x)
>>> f<function <lambda> at 0x108cf3230>