KotlinListsubList

Returns a view of the portion of this list between fromIndex and toIndex.

Syntax

list.subList(from, to)