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, ['Q', 'Z', 'M', 'u', '589', '5471', '425', 'N', '9699', 'L', 'k', 'v', '1671', 'o', '7951', 't', 'T', '8251', 'M', 'N']