create new data

Hello,
I need to ask the following problem:
I have data and 2 points. I need to create a new list where the data at a specified interval.
Thank you for your help :slight_smile:

data={1,2,3,4,5,6,7,8,9}
point1=3
point2=7

I need this: newdata=3,4,5,6,7

You want Part using Span notation:

data = {1, 2, 3, 4, 5, 6, 7, 8, 9} 
point1 = 3 ;
point2 = 7;
newdata = data[[point1 ;; point2]]

The last line means “index point1 through point2 of data.”