Python- Solution Tab not working


#1

def kthsmallest(self, A, B):
c=B
def pre_order(node,c):

        if not node:
            return
        res = pre_order(node.left,c)
        if res != None: return res
        if c == 1: return node.val
        c -= 1
        return pre_order(node.right,c)
    return pre_order(A,c)