DesignScipt code to get List without last item

Hi, is there better way in DesignScript to get List without last item? I’m looking for something more simple like in Python.
image

hi


List.DropItems(a,-1);
cordially
christian.stan

1 Like

Thank you. So nothing super simple like this in Python code: a[:-1]?

1 Like

in the code block you type Lis List you are proposed you put . then Dro then proposed
it’s still well structured
but here it’s true python is even more concise, Mr. Virkram knows perhaps even shorter

cordially
christian.stan

This would be the analogue for Python slicing in DesignScript List.Slice(list, 0, -1, 1)

2 Likes