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.
3, ['2427', '1467', '3967', '3325', '1743', 'Z', '5361', '645', 'P', '509', 't', '4787', 'B', '8377', '9381', 'P', 'x', 'p', '4147', '3131']