Python 2.7 error: max() got an unexpected keyword argument 'key' -


    x = {1:2, 3:6, 5:4}     max(x, key=lambda i: x[i]) 

python 2.7 error:

    max() got unexpected keyword argument 'key' 

python throws similar error message when use min(). how can solve problem? thanks!!!


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -