How to replace values at specific indexes of a python list?

前端 未结 7 946
忘掉有多难
忘掉有多难 2020-12-05 03:59

If I have a list:

to_modify = [5,4,3,2,1,0]

And then declare two other lists:

indexes = [0,1,3,5]
replacements = [0,0,0,0]         


        
7条回答
提交回复
热议问题