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, ['2589', 'Q', 'J', '421', '4917', 's', '3373', 'r', 'e', 'i', '2823', '73', 'A', '4237', 'r', 'U', '4781', '523', '2345', '3691', 'C', 'a', 'x']