Sort Array Python Get Environment