Sort by key works with tuples