human
Count all possible paths from top left to bottom right of a mXn matrix | Python3 program to count all possible paths from top left to top bottom using combinatorics.
We have to calculate m + n - 2 C n - 1 here which will be ( m + n - 2 ) ! / ( n - 1 ) ! ( m - 1 ) ! path = 1.
.
Driver code"
How can the above be solved in Python?

Can you provide a code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required?
assistant
#Here is code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required.
 def numberOfPaths ( m , n ) :
	for i in range ( n , ( m + n - 1 ) ) :
		path *= i ;
		path //= ( i - n + 1 ) ;
	return path ;
print ( numberOfPaths ( 3 , 3 ) ) ;