Implementation of quicksort algorithm in Python