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

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *