{"id":25071,"date":"2021-11-10T09:38:02","date_gmt":"2021-11-10T04:08:02","guid":{"rendered":"https:\/\/python-programs.com\/?p=25071"},"modified":"2021-11-10T09:38:02","modified_gmt":"2021-11-10T04:08:02","slug":"python-set-issuperset-method-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-set-issuperset-method-with-examples\/","title":{"rendered":"Python Set issuperset() Method with Examples"},"content":{"rendered":"
Prerequisite:<\/h5>\n

Python set() Function with Examples<\/span><\/a><\/p>\n

Set issuperset() Method in Python:<\/strong><\/p>\n

If all items in the specified set exist in the original set, the issuperset() method returns true; otherwise, it returns False.<\/p>\n

For Example,<\/p>\n

Let p = {1, 2, 3}<\/p>\n

q= {1, 2, 3, 4, 5, 6}<\/p>\n

Here all the elements of set ‘p ‘ are in the set ‘q’ . Hence set q<\/strong> is the superset<\/strong> of set p<\/strong>.<\/p>\n

And set p<\/strong> is the subset of set q.<\/strong><\/p>\n

Syntax:<\/strong><\/p>\n

set.issuperset(set)<\/pre>\n

Parameters<\/strong><\/p>\n

set:<\/strong>\u00a0This is\u00a0 Required. It is the set to look for items that are similar.<\/p>\n

Return Value:<\/strong><\/p>\n

issuperset() gives<\/p>\n