I need to sort a list of dictionaries by x and y co-ordinates.
My list is:
xy_list = [{'x':40,'y':50},{'x':40,'y':10},{'x':40,'y':50},{'x':20,'y':10},{'x':20,'y':30},{'x':10,'y':10}]
The desired output is:
xy_list = [{'x':10,'y':10},{'x':20,'y':10},{'x':20,'y':30},{'x':40,'y':10},{'x':40,'y':30},{'x':40,'y':50}]
How do I get this sorted?