Question: Sublist of a given list

Given a list say

A=[1, 2,6,7,9,10,15,17]

 

If I give a=3 and b=5

I should get a sublist containing all elements from 3 to 5 in index

 

That is [6,7,9] sublist of the above list

 

Kind help 

Please Wait...