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

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

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

If all of the items in the set exist in the specified set, the issubset() 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 p<\/strong> is a subset of set q<\/strong>.<\/p>\n

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

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

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

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

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

issubset() produces a result.<\/p>\n