Python Sort String Array Js Slice On String