wzhouwzhou / one-line-wonders

OneLineWondersCode | 1000+ Commits | 279/300 One Liners | 200+ Forks | Actively maintained open-source collection of "one-line" programs performing various tasks in different languages
https://hacktoberfest2018.suya.moe
GNU General Public License v3.0
96 stars 192 forks source link

One liner Python script to return unique elements of an arbitrary list #434

Closed RaInta closed 3 years ago

RaInta commented 4 years ago

Please describe your program and how to run it.

This takes in an arbitrary list and returns the unique elements of the original list. Note that this gets around an obvious cheat: the set() collection in Python's standard library achieves exactly this! Then you could just do: list(set(list1))


What Programming Language?

Python