Both 2.7 and 3.6 documentation clearly state that you can't have multiple statements in a lambda function definition:
https://docs.python.org/2/refe...
https://docs.python.org/3/refe...
In fact the function body part of the lambda is not a statement at all, but a single expression that becomes the function's return value:
https://docs.python.org/3/refe...
"There... I've run rings 'round you logically" -- Monty Python's Flying Circus