I am wanting to produce a number matrix which will result in displaying the numbers in chronological order. For example, if a 3 x 3 matrix is desired, the output would result as such: [[1,2,3],[4,5,6],[7,8,9]]
The first part of my code can produce the initial list. However I am unsure how to append the lists that would continue this matrix.
n = int(input("Give me an integer: "))
list1 = []
i = 1
for i in range(1,n+1):
list1 = list1 +
i = i + 1
print list1
Any help or advice would be greatly appreciated. Thank you!