Javascript Array Sort Strings Python Definition