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.
4, ['N', 'v', 'q', 'B', '9311', '3397', '3397', 'Z', 'g', '1803', '6791', '4571', '9257', 'C', '8871', '3451', '7377', 'B']