Array Sorting Function In Python Example