Python Sets
Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python
Program 1
# Set Collection
# myset1={10,20,30,40,50,30,60,20}
# print(len(myset1))
#myset2={101,"Vivek",True,98.66,13+5j}
# print(type(myset1))
# print(type(myset2))
#print(myset1)
#print(myset2)
#myset={10,20}
# mydict={}
# myset=set({})
# myfset=frozenset({})
# print(type(mydict))
# print(type(myset))
# print(type(myfset))
# myset=set({})
# n=int(input("Enter the limit"))
# print("Enter the elements: ")
# for i in range(0,n,1):
# x=int(input())
# myset.add(x)
# for x in myset:
# print(x)
Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

