Python changing last elements of list
You can use for loop for this.
And you can access the last elements by using -1 as index values.
I have 2 lists

[A,B,C,D,E,F] - first list
[X,X,X,X,X,X] - second list

I would like to take last element of the first list and if there are any elements in the second list move them to the left and add the element as last.

[A,B,C,D,E,F]
[X,X,X,X,X,X]
[A,B,C,D,E]
[X,X,X,X,X,F]
[A,B,C,D]
[X,X,X,X,F,E]

Till there is only first element in the first array, so it would stop at:

[A]
[X,F,E,D,C,B]

I'm quite new to Python, I would really appreciate some help