def removeKdigits(self, num, k):
if k>len(num)-1:
return “0”
i = 0
while i< len(num)-1 and k>0:
if int(num[i]) > int(num[i+1]):
num = num[:i]+num[i+1:]
if i>0:
i-=1
k-=1
else:
i+=1
num = num[:len(num)-k]
return str(int(num))