Jak zrobić listę siatki w Python
grid = []
row = []
for i in range(5):
grid.append(row)
for li in grid:
print(id(li))
# 92532104
# 92532104
# 92532104
# 92532104
# 92532104
grid = []
row = []
for i in range(5):
grid.append(row)
for li in grid:
print(id(li))
# 92532104
# 92532104
# 92532104
# 92532104
# 92532104