Skip to content

Instantly share code, notes, and snippets.

@amlanpatnaik001
Created September 13, 2025 16:38
Show Gist options
  • Save amlanpatnaik001/257a3854e8e9eaaf5e837489b3cbdf08 to your computer and use it in GitHub Desktop.
Save amlanpatnaik001/257a3854e8e9eaaf5e837489b3cbdf08 to your computer and use it in GitHub Desktop.
set1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
set2 = {1, 2, 3, 4, 6}
'''
print(set1 & set2)
print(set2.issubset(set1))
print(set1.union(set2))
print(set1.issuperset(set2))
print(set2.issuperset(set1))
print(set1.intersection(set2))
'''
print(set1 | set2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment