|
|
|
|
|
by stevejohnson
4861 days ago
|
|
That will create a list of 100 instances of the same object. object[0].x = 1
print object[1].x
> 1
Edit: On second read, it looks like you're asking something other than what I thought you were asking. Yes, you could create a list of 100 items and then replace its elements, but that's not idiomatic. |
|