Tail Recursion | ''A tail recursive function to calculate factorial ; ''Driver program to test  above function
def fact ( n , a = 1 ) : NEW_LINE INDENT if ( n == 1 ) : NEW_LINE INDENT return a NEW_LINE DEDENT return fact ( n - 1 , n * a ) NEW_LINE DEDENT print ( fact ( 5 ) ) NEW_LINE