issubset() in python
Python set issubset() method returns True if all elements of a set A are present in another set B which is passed as an argument and returns false if all elements not present.
Python set issubset() Syntax:
A.issubset(B) checks whether A is a subset of B or not.
Python set isubset() Return:
returns true if A is a subset of B otherwise false.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
Python set issubset() expample
Example 1: How Python set issubset() work
Example 2: Working with three-set using issubset()
True False False True