Через 2 дня я решил эту проблему использовать View вместо view
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#faf4f4"></View>
Вы можете сделать:
from operator import itemgetter
res = [{"operation": 1, "path": 2}, {"operation": 1, "path": 1}]
res = sorted(res, key=itemgetter("operation", "path"))
print(res)
Вывод
[{'operation': 1, 'path': 1}, {'operation': 1, 'path': 2}]