Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
(Move to ...)
Code
Top 10 Blogs
NumPy Tutorials
Distributions
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
‹
›
Home
View web version
No comments:
Post a Comment