Sort List Using For Loop In Python With Index