what's the difference between the two function? :  def PartitionDemo(a,p,r):
    x=a[p]
    start=p
    end=r
    while start<end :
        while start<end and a[end]>=x :
            end-=1
        while start<end and a[start]<x :
            a[start]=a[end]
            start+=1
            a[end]=a[start]
    a[start]=x
    return start

def Partition2(a,low,high):
    key = a[low]
    while low < high:
        while low < high and a[high] >= key:
            high -= 1
        while low < high and a[high] < key:
            a[low] = a[high]
            low += 1
            a[high] = a[low]
    a[low] = key
    return low

PartitionDemo i write it myself,Partition2 i copy it from the net.but PartitionDemo can't run normally.it can not jump out the loop.they are the same logic i think.Partition2 works well.i try the quicksort in C++,Java,python.i don't understand what's going wrong in python.