Python Sort By First Element Insurance