Sort the given list of numbers in ascending order using quick sort in Python.
arr = [7, 4, 6, 5, 9, 4]
def quick_sort(arr):
    if len(arr) <= 1:
        return arr
 
    pivot = arr[len(arr) // 2]
    left = [x for x in arr if x < pivot]
    middle = [x for x in arr if x == pivot]
    right = [x for x in arr if x > pivot]
    return quick_sort(left) + middle + quick_sort(right)