Shift Array in Python

后端 未结 0 728
挽巷
挽巷 2020-12-02 07:12

How would you shift left an array by x in Python, and fill the empty values with zeros?

shift left by 1

input: [1, 2, 3, 4] output: [2, 3, 4, 0]

shift l

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