In python how can I set multiple values of a list to zero simultaneously?

前端 未结 5 1156
南旧
南旧 2021-02-04 02:10

Conceptually, I want to do:

arr[20:] = 0

where arr is a list. How can I do this?

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