index the first and the last n elements of a list,l[:3] + l[-3:]