Whats the most Pythonic way to make the next n items in an array True, wherever there is a True value in the array

后端 未结 0 1600
抹茶落季
抹茶落季 2020-12-16 17:37

I have an array of booleans

[False, False, True, True, False, True, False, False, False]

and whereever there is a True value, I want to make the next n number

相关标签:
回答
  • 消灭零回复
提交回复
热议问题