Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
News
Distributions
NumPy Tutorials
Self Learning
IDE
Packages
About
Different Set Operations
A = {1,2,3,4,5,6,7,8};
B = {5,10,15,20,25,30,35,40};
print("Union of A and B is",A | B)
print("\nIntersection of A and B is",A & B)
print("\nDifference of A and B is",A - B)
print("\nSymmetric difference of A and B is",A ^ B)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment