quick sorting arrays in python