guys, do you also get Maximum Recursion Depth Python error in recursive sorting algorithm, with input bigger than 1000? array of 998 elements exactly is limit in my case

Here is code

def heapSort(lst,t):

if len(lst)==1:

t.append(lst[0])

return

t.append(lst[0])

del lst[0]

for k in range(len(lst)-1,-1,-1):

heapify(lst, len(lst),k)

heapSort(lst,t)

def heapify(lst, n,i):

largest=i

l=2*largest+1

r=2*largest+2

if l<n and lst[i]<lst[l]:

largest=l

if r<n and lst[largest]<lst[r]:

largest=r

if largest!= i:

lst[i], lst[largest] = lst[largest], lst[i]

heapify(lst,n,largest)