My code is this. I want to add random numbers between 10-99 range. And when the code is running it gives such a problem. All of the four lines become the same. Also I try to give the numbers with input
but in this time also the result was the same. Only the first given four integers take all the four lines.
import random
mx = [[0]*4] * 4
for i in range(4):
for j in range(4):
num = random.randint(10,99)
mx[i][j] = num
#printing
for i in range(4):
for j in range(4):
print(mx[i][j],sep=" ",end=" ")
print()
And it gives this problem
C:\Users\Username\Desktop>python file.py
89 98 99 67
89 98 99 67
89 98 99 67
89 98 99 67
What is problem in the source code?