{"id":3394,"date":"2023-10-21T16:07:37","date_gmt":"2023-10-21T10:37:37","guid":{"rendered":"https:\/\/python-programs.com\/?p=3394"},"modified":"2023-11-10T11:52:14","modified_gmt":"2023-11-10T06:22:14","slug":"python-programming-set-methods","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-programming-set-methods\/","title":{"rendered":"Python Programming \u2013 Set Methods"},"content":{"rendered":"

In this Page, We are Providing Python Programming \u2013 Set Methods. Students can visit for more Detail and Explanation of Python Handwritten Notes<\/a>\u00a0Pdf.<\/p>\n

Python Programming \u2013 Set Methods<\/h2>\n

Set methods<\/strong><\/p>\n

Below are the methods of both set and frozenset objects. Note that the non-operator versions of these methods accept any iterable as an argument, while their operator-based counterparts require their arguments to be set (set and frozenset).<\/p>\n

isdisjoint ( other )
\nReturn True, if the set has no elements in common with other. Sets are disjoint, if and only if their intersection is the empty set.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 , 20] )\r\n>>> s2=set ( [ 30 , 35 , 40 ] )\r\n>>> s1 . isdisjoint ( s2 )\r\nTrue \r\n>>> s1=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s2=frozenset ( [ 30 , 35 , 40 ] )\r\n>>> s1 . isdisjoint ( s2 )\r\nTrue\r\n>>> s1=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s2=frozenset ( [30 , 35 , 40 ] ) \r\n>>> s1 . isdisjoint ( s2 )\r\nTrue<\/pre>\n

issubset ( other )
\nTest whether every element in the set is in other.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1 . issubset ( s2 )\r\nTrue\r\n>>> s1 . issubset ( ( 5 , 10 , 15 , 20 ) )\r\nTrue\r\n>>> s1=frozenset ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1 . issubset ( s2 )\r\nTrue\r\n>>> s1 . issubset ( ( 5 , 10 , 15 , 20 ) )\r\nTrue<\/pre>\n

The operator based version of the the above method is set<=other.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1<=s2\r\nTrue<\/pre>\n

The operator based version setcother test whether the set is a proper subset of other, that is, set<=other and set!=other.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1<s2 \r\nTrue<\/pre>\n

issuperset (other).<\/p>\n

Test whether every element in other is in the set.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=set ( [ 5 , 10 , 15 , 20 ] ) \r\n>>> s2 . issuperset ( s1 )\r\nTrue\r\n>>> s2 . issuperset ( ( 5 , 15 ) )\r\nTrue\r\n>>> s1=frozenset ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s2 . issuperset ( s1 )\r\nTrue\r\n>>> s2 . issuperset ( ( 5 , 15 ) )<\/pre>\n

The operator based version of the the above method is set >=other.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1>=s2 \r\nFalse<\/pre>\n

The operator-based version set> another test whether the set is a proper superset of other, that is, set>=other and set! =other.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=frozenset ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s1<s2 \r\nFalse<\/pre>\n

union ( other, . . . )<\/p>\n

Return a new set with elements from the set and all others.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2= [ 15 , 20 , 25 ]\r\n>>> s3=frozenset ( [ 30 , 35 , 40 ] )\r\n>>> s1 . union ( s2 , s3 )\r\nset ( [ 35 , 20 , 5 , 40 , 25 , 30 , 15 ] )<\/pre>\n

The operator based version of the above method is set | other. . .<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=set ( [ 15 , 20 , 25 ] ) \r\n>>> s3=frozenset ( [ 30 , 35 , 40 ] )\r\n>>> s1 | s2 | s3\r\nset ( [ 35 , 20 , 5 , 40 , 25 , 30 , 15 ] )<\/pre>\n

intersection ( other , . . .)<\/p>\n

Return a new set with elements common to the set and all others .<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] ) \r\n>>> s2= [ 15 , 20 , 25 , 10 ]\r\n>>> s3=frozenset ( [ 30 , 15 , 35 , 40 , 10 ] ) \r\n>>> s4= ( 40 , 50 , 10 , 15 , 20 )\r\n>>> si . intersection ( s2 , s3 , s4 ) \r\nset ( [ 10 , 15 ] )<\/pre>\n

The operator based version of the above method is set&other . . .<\/p>\n

>>> s1=set ( [ 5 , 10 , 15] )\r\n>>> s2=set ( [ 15 , 20 , 25 , 10 ] )\r\n>>> s3=frozenset ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4=frozenset ( [ 40 , 50 , 10 , 15 , 20 ] )\r\n>>> s1&s2&s3&s4 \r\nset ( [ 10 , 15 ] )<\/pre>\n

difference ( other, . . . )<\/p>\n

Return a new set with elements in the set that are not in the others.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] )\r\n>>> s2= [ 15 , 20 , 25 , 10 ]\r\n>>> s3=frozenset ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4= ( 40 , 50 , 10 , 15 , 20 )\r\n>>> s3.difference ( s1 , s2 , s4 ) \r\nfrozenset ( [ 35 , 30 ] )<\/pre>\n

The operator based version of the above method is set-other- . . .<\/p>\n

>>> s1-set ( [ 5 , 10 , 15 ] )\r\n>>> s2=set ( [ 15 , 20 , 25 , 10 ] )\r\n>>> s3=frozenset ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4=frozenset ( [ 40 , 50 , 10 , 15 , 20 ] )\r\n>>> s1 - s2 - s3 - s4 \r\nset ( [ 5 ] )\r\n>>> s3 - s1 - s2 - s4 \r\nfrozenpet ( [ 35 , 30 ] )<\/pre>\n

symmetric_difference ( other )<\/p>\n

Return a new set with elements in either the set or other but not both.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] )\r\n>>> s2= [ 15 , 20 , 25 , 10 ]\r\n>>> s1 . symmetric_difference ( s2 ) \r\nset ( [ 25 , 20 , 5 ] )<\/pre>\n

The operator based version of the the above method is set Aother.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] )\r\n>>> s2=frozenset ( [ 15 , 20 , 25 , 10 ] )\r\n>>> s1\u2227 s2\r\nset ( [ 25 , 20 , 5 ] ) \r\n>>> s2\u2227s1\r\nfrozenset ( [ 25 , 20 , 5 ] )<\/pre>\n

copy ( )
\nReturn a copy of the set.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> a=s.copy ( )\r\n>>> a\r\nset ( [ 10 , 20 , 5 , 15 ] )\r\n>>> s=frozenset ( [ 5 , 10 , 15 , 20] )\r\n>>> a=s.copy ( )\r\n>>> a\r\nfrozenset ( [ 10 , 20 , 5 , 15 ] )<\/pre>\n

The following methods are available for set and do not apply to immutable instances of frozenset.<\/p>\n

update ( other , . . . )<\/p>\n

Update the set, adding elements from all others.<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2= ( 15 , 20 , 25 )\r\n>>> s3=frozenset ( [ 30 , 35 , 40] )\r\n>>> s1 . update ( s2 , s3 )\r\n>>> s1\r\nset ( [ 35 , 20 , 5 , 40 , 25 , 30 , 15 ] )<\/pre>\n

The operator based version of the above method is set | =other | . . .<\/p>\n

>>> s1=set ( [ 5 , 15 ] )\r\n>>> s2=set ( [ 15 , 20 , 25 ] )\r\n>>> s3=frozenset ( [ 30 , 35 , 40 ] )\r\n>>> s1|= s2 | s3 \r\n>>> s1\r\nset ( ' [ 35 , 5 , 40 , 15 , 20 , 25 , 30 ] )<\/pre>\n

intersection_update ( other , . . .)<\/p>\n

Update the set, keeping only elements found in it and all others.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] )\r\n>>> s2= [ 15 , 20 , 25 , 10 ] \r\n>>> s3=set ( [ 30 , 15 , 35 , 40 , 10 ] ) \r\n>>> s4= ( 40 , 50 , 10 , 15 , 20 )\r\n>>> s1 . intersection_update ( s2 , s3 , s4 )\r\n>>> s1\r\nset ( [ 10 , 15 ] )<\/pre>\n

The operator based version of the the above method is set&=other& . . .<\/p>\n

>>> s1=set ( [ 5 , 10 , 15] )\r\n>>> s2=set ( [ 15 , 20 , 25 , 10] )\r\n>>> s3=frozenset ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4=frozenset ( [ 40 , 50 , 10 , 15 , 20 ] )\r\n>>> s1&=s2&s3&s4 \r\n>>> s1\r\nset ( [10 , 15 ] )<\/pre>\n

difference_update(other, . . .)<\/p>\n

Update the set, removing elements found in others.<\/p>\n

>>> s1=frozenset ( [ 5 , 10 , 15 ] )\r\n>>> s2= [ 15 , 20 , 25 , 10 ]\r\n>>> s3=set ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4= ( 40 , 50 , 10 , 15 , 20 )\r\n>>> s3 . difference_update ( s1 , s2 , s4 )\r\n>>> s3\r\nset ( [ 35 , 30 ] )<\/pre>\n

The operator based version of the above method is set-=other | . . .<\/p>\n

>>> s1=frozenset ( [ 5 , 10 , 15 ] )\r\n>>> s2=frozenset ( [ 15 , 20 , 25 , 10 ] )\r\n>>> s3=set ( [ 30 , 15 , 35 , 40 , 10 ] )\r\n>>> s4=frozenset ( [ 40 , 50 , 10 , 15 , 20 ] )\r\n>>> s3-=s1 | s2 | s4 \r\n>>> s3\r\nset ( [ 35 , 30 ] )<\/pre>\n

symmetric_difference_update(other)
\nUpdate the set, keeping only elements found in either set, but not in both.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] ) \r\n>>> s2= [ 15 , 20 , 25 , 10 ]\r\n>>> s1 . symmetric_dif ference_update ( s2 )\r\n>>> s1\r\nset ( [ 25 , 20 , 5 ] )<\/pre>\n

The operator based version of the the above method is set\/’=other.<\/p>\n

>>> s1=set ( [ 5 , 10 , 15 ] ) \r\n>>> s2=frozenset ( [ 15 , 20 , 25 , 10 ] )\r\n>>> s1 A=s2 \r\n>>> s1\r\nset ( [ 25 , 20 , 5 ] )<\/pre>\n

add ( elem )<\/p>\n

The method adds element elem to the set.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s.add ( 25 )\r\n>>> s\r\nset ( [ 25 , 10 , 20 , 5 , 15 ] )<\/pre>\n

remove ( elem )<\/p>\n

Remove element elem from the set. Raises KeyError, if elem is not contained in the set.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s.remove ( 15 )\r\n>>> s\r\nset ( [ 10 , 20 , 5 ] )\r\n>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s . remove ( 100 )\r\nTraceback ( most recent call last ) :\r\nFile \" <stdin> \" , line 1 , in <module>\r\nKeyError: 100<\/pre>\n

discard ( elem )<\/p>\n

Remove element elem from the set if it is present. It is difference from remove () in a way that it does not raise KeyError if elem is not present in the set.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s . discard ( 15 )\r\n>>> s\r\nset ( [ 10 , 20 , 5 ] )\r\n>>> s . discard ( 100 )\r\n>>> s\r\nset ( [ 10 , 20 , 5 ] )<\/pre>\n

pop ( )<\/p>\n

Remove and return an arbitrary element from the set. Raises KeyError, if the set is empty.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20] ) \r\n>>> s . pop ( )\r\n10\r\n>>> s\r\nset ( [ 20 , 5 , 15 ] )\r\n>>> s . pop ( )\r\n20\r\n>>> s\r\nset ( [ 5 , 15 ] )<\/pre>\n

clear ( )<\/p>\n

Remove all elements from the set.<\/p>\n

>>> s=set ( [ 5 , 10 , 15 , 20 ] )\r\n>>> s . clear ( )\r\n>>> s \r\nset ( [ ] )<\/pre>\n","protected":false},"excerpt":{"rendered":"

In this Page, We are Providing Python Programming \u2013 Set Methods. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Set Methods Set methods Below are the methods of both set and frozenset objects. Note that the non-operator versions of these methods accept any iterable as an argument, while …<\/p>\n

Python Programming \u2013 Set Methods<\/span> Read More »<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5],"tags":[],"yoast_head":"\nPython Programming \u2013 Set Methods - Python Programs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/python-programs.com\/python-programming-set-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Programming \u2013 Set Methods - Python Programs\" \/>\n<meta property=\"og:description\" content=\"In this Page, We are Providing Python Programming \u2013 Set Methods. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Set Methods Set methods Below are the methods of both set and frozenset objects. Note that the non-operator versions of these methods accept any iterable as an argument, while … Python Programming \u2013 Set Methods Read More »\" \/>\n<meta property=\"og:url\" content=\"https:\/\/python-programs.com\/python-programming-set-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Programs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/btechgeeks\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-21T10:37:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-10T06:22:14+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@btech_geeks\" \/>\n<meta name=\"twitter:site\" content=\"@btech_geeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasanna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/python-programs.com\/#organization\",\"name\":\"BTech Geeks\",\"url\":\"https:\/\/python-programs.com\/\",\"sameAs\":[\"https:\/\/www.instagram.com\/btechgeeks\/\",\"https:\/\/www.linkedin.com\/in\/btechgeeks\",\"https:\/\/in.pinterest.com\/btechgeek\/\",\"https:\/\/www.youtube.com\/channel\/UC9MlCqdJ3lKqz2p5114SDIg\",\"https:\/\/www.facebook.com\/btechgeeks\",\"https:\/\/twitter.com\/btech_geeks\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png\",\"contentUrl\":\"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png\",\"width\":350,\"height\":70,\"caption\":\"BTech Geeks\"},\"image\":{\"@id\":\"https:\/\/python-programs.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/python-programs.com\/#website\",\"url\":\"https:\/\/python-programs.com\/\",\"name\":\"Python Programs\",\"description\":\"Python Programs with Examples, How To Guides on Python\",\"publisher\":{\"@id\":\"https:\/\/python-programs.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/python-programs.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage\",\"url\":\"https:\/\/python-programs.com\/python-programming-set-methods\/\",\"name\":\"Python Programming \u2013 Set Methods - Python Programs\",\"isPartOf\":{\"@id\":\"https:\/\/python-programs.com\/#website\"},\"datePublished\":\"2023-10-21T10:37:37+00:00\",\"dateModified\":\"2023-11-10T06:22:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/python-programs.com\/python-programming-set-methods\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/python-programs.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Programming \u2013 Set Methods\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage\"},\"author\":{\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb\"},\"headline\":\"Python Programming \u2013 Set Methods\",\"datePublished\":\"2023-10-21T10:37:37+00:00\",\"dateModified\":\"2023-11-10T06:22:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage\"},\"wordCount\":515,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/python-programs.com\/#organization\"},\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/python-programs.com\/python-programming-set-methods\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb\",\"name\":\"Prasanna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"caption\":\"Prasanna\"},\"url\":\"https:\/\/python-programs.com\/author\/prasanna\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Programming \u2013 Set Methods - Python Programs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/python-programs.com\/python-programming-set-methods\/","og_locale":"en_US","og_type":"article","og_title":"Python Programming \u2013 Set Methods - Python Programs","og_description":"In this Page, We are Providing Python Programming \u2013 Set Methods. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Set Methods Set methods Below are the methods of both set and frozenset objects. Note that the non-operator versions of these methods accept any iterable as an argument, while … Python Programming \u2013 Set Methods Read More »","og_url":"https:\/\/python-programs.com\/python-programming-set-methods\/","og_site_name":"Python Programs","article_publisher":"https:\/\/www.facebook.com\/btechgeeks","article_published_time":"2023-10-21T10:37:37+00:00","article_modified_time":"2023-11-10T06:22:14+00:00","twitter_card":"summary_large_image","twitter_creator":"@btech_geeks","twitter_site":"@btech_geeks","twitter_misc":{"Written by":"Prasanna","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/python-programs.com\/#organization","name":"BTech Geeks","url":"https:\/\/python-programs.com\/","sameAs":["https:\/\/www.instagram.com\/btechgeeks\/","https:\/\/www.linkedin.com\/in\/btechgeeks","https:\/\/in.pinterest.com\/btechgeek\/","https:\/\/www.youtube.com\/channel\/UC9MlCqdJ3lKqz2p5114SDIg","https:\/\/www.facebook.com\/btechgeeks","https:\/\/twitter.com\/btech_geeks"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/python-programs.com\/#\/schema\/logo\/image\/","url":"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png","contentUrl":"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png","width":350,"height":70,"caption":"BTech Geeks"},"image":{"@id":"https:\/\/python-programs.com\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/python-programs.com\/#website","url":"https:\/\/python-programs.com\/","name":"Python Programs","description":"Python Programs with Examples, How To Guides on Python","publisher":{"@id":"https:\/\/python-programs.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/python-programs.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage","url":"https:\/\/python-programs.com\/python-programming-set-methods\/","name":"Python Programming \u2013 Set Methods - Python Programs","isPartOf":{"@id":"https:\/\/python-programs.com\/#website"},"datePublished":"2023-10-21T10:37:37+00:00","dateModified":"2023-11-10T06:22:14+00:00","breadcrumb":{"@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/python-programs.com\/python-programming-set-methods\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/python-programs.com\/"},{"@type":"ListItem","position":2,"name":"Python Programming \u2013 Set Methods"}]},{"@type":"Article","@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#article","isPartOf":{"@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage"},"author":{"@id":"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb"},"headline":"Python Programming \u2013 Set Methods","datePublished":"2023-10-21T10:37:37+00:00","dateModified":"2023-11-10T06:22:14+00:00","mainEntityOfPage":{"@id":"https:\/\/python-programs.com\/python-programming-set-methods\/#webpage"},"wordCount":515,"commentCount":0,"publisher":{"@id":"https:\/\/python-programs.com\/#organization"},"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/python-programs.com\/python-programming-set-methods\/#respond"]}]},{"@type":"Person","@id":"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb","name":"Prasanna","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/python-programs.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","caption":"Prasanna"},"url":"https:\/\/python-programs.com\/author\/prasanna\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3394"}],"collection":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/comments?post=3394"}],"version-history":[{"count":1,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3394\/revisions"}],"predecessor-version":[{"id":3396,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3394\/revisions\/3396"}],"wp:attachment":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/media?parent=3394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/categories?post=3394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/tags?post=3394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}