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, ['3785', 'E', '2319', 'k', '8489', 'D', '4617', '4079', 'i', '1859', 'c', '1565', 'K', 'l', 'x', 'J', 'R', 'U', '3491', '6321']