Example & Tutorial understanding programming in easy ways.

How we can convert the List to Sets in Python ?

program:

l=[1,2,3,4,1,2]

s=set(l)

print(s)

output:

{1,2,3,4}


-Here set() function are able to do this, and it remove the duplicate items.

Read More →