KotlinListdistinct

Returns a list containing only distinct elements.

Syntax

list.distinct()