I want to sort dictionary keys by values using sorted function with lambda function
word_count = {"a":25, "and":10, "the":15,"for":9, "or":7}
using this sorted function:
x = sorted(word_count.items(), key=lambda(k,v):v, reverse=True)
This function works in Python 2.7, but in Python 3 I'm getting Syntax error.
Could you pls someone explain why this sorting function doesnt work in Python3? Thx.