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.
10, ['4165', 'U', 'g', 'o', '2143', 'p', 'S', 'Z', 'T', '4009', 'G', 'j', 'q', '7071', 'd', 'x', '1157', '3541', '7171', 'p']