Logo

Programming-Idioms

History of Idiom 118 > diff from v55 to v56

Edit summary for version 56 by programming-idioms.org:
[Python] +DemoURL, +DocURL

Version 55

2020-12-28, 22:48:50

Version 56

2020-12-29, 10:26:31

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Variables
y,x
Variables
y,x
Code
y = set(x)
Code
y = set(x)
Doc URL
https://docs.python.org/3/library/stdtypes.html#set
Demo URL
https://repl.it/@ProgIdioms/TediousStaleNamebinding