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', 'c', 'A', '1073', 'T', '997', 'Q', '9105', 'b', 'Z', '471', '447', 'x', '5919', 'S', '5599', 'k', '4737', '597']