如果我有一个可变长度的数组类型的列,例如:
[ [1,2,3,4,6] ]
[ [0,4,5,4,6,8,9,1] ]
[ [1,2,3,4,6,2,4,5,6] ]
...
如何拆分它,使第一个索引与其余索引分开,例如:
[ [1] ], [ [2,3,4,6] ]
[ [0] ], [ [4,5,4,6,8,9,1] ]
[ [1] ], [ [2,3,4,6,2,4,5,6] ]
在纯Python中我可能会这样做:
new_list = list[0]
second_list = list[1:]