dimensions = [1, 2, 3, 4]
for dimension in dimensions:
print(dimension)
for index in range(0, len(dimensions)):
dimensions[index] = dimensions[index] * 2
for dimension in dimensions:
print(dimension)
Python:遍历修改列表数字元素
最新推荐文章于 2024-09-21 17:01:35 发布