Python does not allow for recursion. Keep getting a Runtime Error on how the function is not defined.
you might check the code once again.python recursion is not the problem may be you are getting infinite loop due to a missed base condition.
This is because function is a part of a class. Try calling it like self.function().
this one line solution so good for python programmers
return self.gcd(B,A%B) if A and B else max(A,B)
nice one liner, thanks for sharing !!