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, ['4789', '2239', '6591', 'D', 'M', 'y', '9823', '1731', '3649', '1925', '693', 'h', '859', 'K', 'p', '6519', '9021', 'k', 'Y']