Python set() Class

The set() class in Python returns a new set object, optionally with elements taken from iterable. 

Syntax

Parameter

iterable : This parameter represents a sequence, collection or an iterator object

Return

This function returns a new set object where the items in a set list are unordered. 

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This