x = [{'url': 'example.com', 'rank': '11,279'}, {'url': 'facebook.com',
    'rank': '2'}, {'url': 'google.com', 'rank': '1'}, {'url': 'google.com',
    'rank': '11,280'}, {'url': 'google.com', 'rank': '12'}]
results = sorted(x, key=lambda k: ast.literal_eval(k.get('rank').replace(
    ',', '')))
print([i for i in results])
How to convert dictionary values to int in Python?