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.
8, ['371', '2861', 't', 'W', '4283', '3705', '6817', '3797', 'g', '7871', '6235', 'L', 'D', 'G', 'H', '6221', '4269', 'M', '8997']