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.
9, ['3971', '1599', '523', 'B', 'r', '9681', 'K', 'T', 'n', '3083', '4331', 'U', 'z', 'Z', 'X', '1843', 'Z', '8343']