Python: Python: lambda in a dictionary