更新时间:2022-12-08 23:07:39
由于元组是不可变的,因此您可以执行以下操作:
Since tuples are immutable you may be able to do:
lst = [tuples[0]]
repeated = lst * 10 # create a list of the first tuple repeated 10 times
如果它们包含可变对象,则由于它们是重复的相同对象,因此其中任何一个的更改都将反映在所有对象中.
If they contain mutable objects changes in any of them will reflect in all of them, since these are the same objects repeated.