Python Sort Array By Columns Definition