There is an array of values ​​divided into 3 subarrays. It is necessary that the extreme arrays of array [0] and array [2] contain the same number of values, the extra values ​​are not deleted, but transferred to array [1]. The alignment of the subarray values ​​comes with array [0], I understand that you can transfer the last value of array [0] to the first position of array [1]. I do not understand how?

[array([118020., 118010., 118000., 117990.]), array([117980., 117970., 117960.]), array([117950., 117940., 117930.])] 

Closed due to the fact that off-topic participants nörbörnën , Suvitruf , dlarchikov , 0xdb , Fat-Zer 20 May '18 at 23:52 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • " Learning tasks are allowed as questions only on the condition that you tried to solve them yourself before asking a question . Please edit the question and indicate what caused you difficulties in solving the problem. For example, give the code you wrote, trying to solve the problem "- nörbörnën, Suvitruf, dlarchikov, 0xdb, Fat-Zer
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

      while len(lst[0]) != len(lst[2]): if len(lst[0]) < len(lst[2]): cache =lst[2].pop(-1) lst[1].insert(0, cache) else: cache =lst[0].pop(-1) lst[1].insert(0, cache) 

    Pretty simple, if you know the methods of lists.