l = [] for i in range(4): l.append([0]*4) print(l) num = 1 for j in range(4): for i in range(4): l[j][i]=num num += 1 print(l)
To embed this project on your website, copy the following code and paste it into your website's HTML: