DEV Community

Discussion on: Python 102! Introduction to Python : Intermediate Concepts.

Collapse
 
cjsmocjsmo profile image
Charlie J Smotherman • Edited

A neat trick with sets

aset = [1,2,3,3,3,4,4,5]

list(set(aset))

Will give you

[1,2,3,4,5]

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Thank you for adding this