rotating a list using Pandas only

后端 未结 0 1968
野的像风
野的像风 2020-12-04 10:13

We are all familiar with the classic question of rotating a list to the left, say:

mylist = [1,2,3,4,5,6,7]

#rotate by two to the left
mylist[2:] + mylist[:2         


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