Python Set - Issubset Method

Method Name: issubset(anotherSetObject_in)

Method Overview:

Determines whether a set object passed is a subset of the current/this set object.

Parameters

anotherSetObject_in : A python set object which is to be determined that whether it forms a subset of this/current set object

Return Value:

True: When the python set object passed inside the method is a subset of the current/this set object. 

False: When the python set object passed inside the method is not a subset of the current/this set object. 

Exceptions:

None

Example:

>>> ComputerSciencePapers = {"Operating System Design", "Compiler Design","Programming Languages"}

>>> MechanicalEngineeringPapers  = {"IC Engine Design", "Workshop Management"}

>>> ComputerSciencePapers.issubset(MechanicalEngineeringPapers)

False


Copyright 2023 © pythontic.com