Definition
This method returns true if one sets items are present inside another set, that is it returns true if one set is subset for another set. Since it returns a value original set remains unchanged and value is printed through third variable.
Syntax
Variable = A.issubset(B)
This method takes an argument
Working
Code
- Set A being taken
- Set B is being taken
- issubset() method is being applied to set B with the help of set A.
- Value is being printed inside C.
Output
- Returns true since B set is present inside set A
Note that if there is a mismatch of even a single item it will return a false.
Quick Links:
What is a list in python, How to use list and its methods?
What Are List/Array Methods | Types Of Methods In Python List.