# Delete element from list [closed]

I have a list with 1000 elements, and I want to delete all elements from index 400 (including) until the last element.

• Do you want or need anything more than list = list[[1;;399]] ? – High Performance Mark Nov 4 at 8:23
• @HighPerformanceMark: Thank you. I added your comment as an answer. – tommsch Nov 4 at 8:31
• Drop[val, {400, -1}] – OkkesDulgerci Nov 4 at 15:32

As commented by "High Performance Mark". This is the way to go:

val=Table[i,{i,1,1000}];
val=val[[1;;399]];