def access_elements(nums, list_index): result = [nums[i] for i in list_index] return result