Function Details: issubset

Description


Report whether another set contains this set.


Extended Description


The issubset() method checks if all elements of the calling set are present in the specified iterable. It returns True if every element in the set is in the iterable, and False otherwise. This method is equivalent to the <= operator for sets.


Function Signature



Module: set

Class: set

Parameters



Parameter List


  • other: Iterable

Return


Returns True if the set is a subset of the specified iterable, False otherwise.


Return Type


bool

Output

Explanation

This example demonstrates the basic usage of issubset(). s1 is a subset of s2, but s2 is not a subset of s1.