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.
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.