Edit
the problem was with my indentations
Original question
I am new user in Python, I have a problem with the None type, I looked different question, but the problem persists.
my code is calculate factorial
def fact(k): if k > 0: result = k + fact(k-1) print(result) else: result=0 return resultfact(3)