For this Question: Given an index K, return the K-th row of <a href = "https://en.wikipedia.org/wiki/Pascal%27s_triangle">Pascal’s triangle</a>.
You must print the K-th row modulo 10<sup>9</sup> + 7.

<b>The rows of Pascal's triangle are conventionally enumerated starting with row K=0 at the top (the 0th row) </b>The only line of input contains the input K.

<b>Constraints:-</b>
0 &le; K &le; 3000
Print k-th row of Pascal's Triangle containing k+1 integers modulo 10^9+7.Sample Input :
3

Sample Output:
1 3 3 1, I have written this Solution Code: def generateNthRow (N):
 
    prev = 1
    print(prev, end = '')
 
    for i in range(1, N + 1):
 
        curr = (prev * (N - i + 1)) // i
        print("", curr%1000000007, end = '')
        prev = curr
 
N = int(input())
 
generateNthRow(N), In this Programming Language: Python, Now tell me if this Code is compilable or not?