sorting dictionary in python using lambda