Nov-05-2016, 09:39 PM
Hello guys,
I created a list into a function:
"def display(board,n,p):"
and I want to put the list grid in my function newBoard into the parameter of display as board (board=grid)
Someone knows how can I do this pls?
I created a list into a function:
n=eval(input("Enter a number of rows: ")) p=eval(input("Enter a number of columns: ")) def newBoard(n=5,p=4): a=[[1]*p for i in range(2)] b=[[0]*p for i in range(n-4)] c=[[2]*p for i in range(2)] grid=a+b+c return(grid)now, I want to create another function:
"def display(board,n,p):"
and I want to put the list grid in my function newBoard into the parameter of display as board (board=grid)
Someone knows how can I do this pls?