In this task, you are given inputs i and A, where i is an integer and A is a list. You need to list all the elements of A preceding the last i elements. i will always have a value less than the length of A.
6, ['O', 'Z', '2747', '223', 'y', '2367', 'n', '6195', 'r', 'B', '3617', '2033', 'g', 'b', '8807', 'S', '9117', 'J', 'g']