Definition: In this task, you are given inputs i,j, and A, where i and j are integers and A is a list. You need to list all elements of A from the ith element to the jth element. i and j will be non-negative, and will always have a value less than the length of A. i will always be less than j.
Input: 18, 24, ['c', 'A', '1317', 'I', 'I', '1467', 'd', '1709', '3951', '9771', 'P', 'E', '2987', 'e', 'd', '9285', '4123', 'q', '8059', '4811', '8729', '9539', 'P', 'J', 'B']

q, 8059, 4811, 8729, 9539, P, J