I am stuck on a list and do not get it - why do I get the result below:
TenLast = [["."] * 10 ] * NumberOfHosts
for i in range(0,NumberOfHosts):
TenLast[i][0] = i
print(TenLast)
exit()
[[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.']]
I would expect
[[0, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[1, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[2, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[3, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[4, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[5, '.', '.', '.', '.', '.', '.', '.', '.', '.'],
[6, '.', '.', '.', '.', '.', '.', '.', '.', '.']]
thank you for for help,support and any ideas.
regards, HEP