Write a Python program to check if two given sets have no elements in common

Hits: 219 (Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to check if two given sets have no elements in common.   Sample Solution: Python Code: x = {1,2,3,4} y = {4,5,6,7} z = {8} print(“If two given sets have no elements in common”) print(“Compare x and y:”) print(x.isdisjoint(y)) … Continue reading Write a Python program to check if two given sets have no elements in common