Wolfram Research

Function Repository Resource:

TrimLeft

Source Notebook

Shorten lists to the same length by removing elements from the left

Contributed by: Taliesin Beynon

ResourceFunction["TrimLeft"][{list1,list2,}]

trims all listi to the length of the shortest list, removing elements from the left.

Examples

Basic Examples

Trim the lists by removing elements from the left:

In[1]:=
ResourceFunction["TrimLeft"][{{1}, {2, 3}}]
Out[1]=

Properties and Relations

TrimRight removes elements from the right:

In[2]:=
ResourceFunction["TrimRight"][{{1}, {2, 3}}]
Out[2]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

See Also

License Information