Python Set issubset() method

The set.issubset() method in Python returns True if all items in the set exists in the specified set, otherwise it returns False.

Syntax

Parameter

set- This parameter represents the set to check whether it is a subset of set1 or not.

set1- This argument signifies the other set.

Return

This method returns a Boolean value True if all items in the set exists in the specified set, otherwise it returns False.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This