

{"id":7336,"date":"2018-02-06T13:03:39","date_gmt":"2018-02-06T07:33:39","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=7336"},"modified":"2026-04-22T15:56:33","modified_gmt":"2026-04-22T10:26:33","slug":"python-namedtuple","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/","title":{"rendered":"Python Namedtuple &#8211; Working and Benefits of Namedtuple in Python"},"content":{"rendered":"<p>In our journey so far, we have seen Python tuples, which is an important container type. Today, we will talk about Python namedtuple with its example &amp; syntax.<\/p>\n<p>Moreover, we will start our learning with a quick revision of Python tuples and Accessing Elements of Python namedtuple. At last, we will cover the working and benefits of Python namedtuple.<\/p>\n<p>So, let&#8217;s start the Python Namedtuple Tutorial.<\/p>\n<h3>What is a Python Tuple?<\/h3>\n<p>Before we proceed, we think we must review tuples in Python.<\/p>\n<p>A Python tuple is a container that can hold different values. Let\u2019s take an example.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; colors=(255,0,0)<\/pre>\n<p>As you can see, we define it using parentheses. To access an element, we use indices. (And remember, indexing starts at 0)<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; colors[0]<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">255<\/div>\n<p>What makes a &gt;&gt;&gt; colors[0] Python tuple unique is that its values cannot be changed, i.e., it is immutable.<\/p>\n<p>Let\u2019s try changing a value.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; colors[1]=10<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#316&gt;&#8221;, line 1, in &lt;module&gt; c<\/p>\n<p>olors[1]=10<\/p>\n<p>TypeError: &#8216;tuple&#8217; object does not support item assignment<\/p>\n<\/div>\n<p>Now that we\u2019ve taken a quick revision at tuples, let&#8217;s proceed to Python syntax.<\/p>\n<h3>Python Namedtuple &#8211; Syntax<\/h3>\n<p>A Python namedtuple lets us access elements in a tuple using names\/labels. To define it, we import namedtuple from the Python collections module and use the namedtuple() factory function.<\/p>\n<p><strong>Operations that can be done by using namedtuple in Python are:<\/strong><\/p>\n<ul>\n<li><strong>Create a nametuple.<\/strong><\/li>\n<li><strong>Access operations:<\/strong> If you want to access a field, namedtuple provides you with a simple way.<\/li>\n<li><strong>Conversion operation:<\/strong> They provide you with a useful operation that works with other data in Python.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; from collections import namedtuple\r\n&gt;&gt;&gt; Colors=namedtuple('Colors','red green blue')<\/pre>\n<p>Here, we use the function namedtuple().<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; type(namedtuple)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&lt;class &#8216;function&#8217;&gt;<\/p>\n<\/div>\n<p>This takes two arguments-<\/p>\n<ol>\n<li>Tuple name- Here, Colors is the tuple<\/li>\n<li>Python string of fields, separated by spaces- Here, we have three fields: red, green, and blue.<\/li>\n<\/ol>\n<p>Now, let\u2019s define some Python tuples.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red=Colors(red=255,green=0,blue=0)\r\n&gt;&gt;&gt; green=Colors(red=0,green=255,blue=0)\r\n&gt;&gt;&gt; blue=Colors(red=0,green=0,blue=255)\r\n&gt;&gt;&gt; red<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Colors(red=255, green=0, blue=0)<\/p>\n<\/div>\n<p>We\u2019ll just leave here another way to define a Python namedtuple- using a list instead of a string of fields.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; pets=namedtuple('pets',['name','age'])\r\n&gt;&gt;&gt; Fluffy=pets('Fluffy',8)\r\n&gt;&gt;&gt; Fluffy<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>pets(name=&#8217;Fluffy&#8217;, age=8)<\/p>\n<\/div>\n<h3>Accessing Elements in a Python Namedtuple<\/h3>\n<p>To access an item, we can now use the dot operator to access a field by its name. We do it this way:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red.red<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>255<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red.green<\/pre>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red.blue<\/pre>\n<p>See how simple it makes this? This way, a namedtuple is something like a Python dictionary.<\/p>\n<p>But really, Python namedtuple is backward-compatible with a regular Python tuple. This means that we can access a value using indexing as well.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red[0]<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>255<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red[1]<\/pre>\n<p>Finally, you can also access a value using the getattr() function.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; getattr(red,'green')<\/pre>\n<p>To see what kind of Python objects these are, we use the type() function, like we always do.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; type(Colors)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&lt;class &#8216;type&#8217;&gt;<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; type(red)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&lt;class &#8216;__main__.Colors&#8217;&gt;<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; type(red.red)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&lt;class &#8216;int&#8217;&gt;<\/p>\n<\/div>\n<h3>How Namedtuple in Python Works?<\/h3>\n<p>Let\u2019s see some more things we can do with a namedtuple in Python.<\/p>\n<h4>1. A Python namedtuple is Immutable<\/h4>\n<p>Like its regular counterpart, a Python namedtuple is immutable. We can\u2019t change its attributes.<\/p>\n<p>To prove this, we\u2019ll try changing one of the attributes of a tuple of type \u2018Colors\u2019.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red.blue=1<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#319&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>red.blue=1<\/p>\n<p>AttributeError: can&#8217;t set attribute<\/p>\n<\/div>\n<p>As is visible, it raises an AttributeError. Hence, we conclude that a Python namedtuple is immutable.<\/p>\n<h4>2. Converting a Python namedtuple into a Python Dictionary<\/h4>\n<p>A namedtuple in Python is much like a dictionary, but if we want to convert it into one, we can:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red._asdict()<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>OrderedDict([(&#8216;red&#8217;, 255), (&#8216;green&#8217;, 0), (&#8216;blue&#8217;, 0)])<\/p>\n<\/div>\n<p>As you can see, we use the ._asdict() function for this. Also, this gives us a Python OrderedDict.<\/p>\n<p>We\u2019ll see that in detail in its own lesson.<\/p>\n<h4>3. Creating a namedtuple from a Python Iterable<\/h4>\n<p>If you have a Python list, you can make a namedtuple from it. But for this, you must have defined the format.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; Colors._make(['Purple','Violet','Gold'])<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Colors(red=&#8217;Purple&#8217;, green=&#8217;Violet&#8217;, blue=&#8217;Gold&#8217;)<\/div>\n<h4>4. Converting a Python Dictionary into a namedtuple<\/h4>\n<p>CoA converses what we learned in point b, we can turn a dictionary into a namedtuple in Python.<\/p>\n<p>We do this using two asterisks before the dictionary to be passed as an argument to Colors here.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; Colors(**{'red':255,'green':0,'blue':0})<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Colors(red=255, green=0, blue=0)<\/p>\n<\/div>\n<h4>5. Checking what fields belong to a Python tuple<\/h4>\n<p>For this, we use the _fields attribute.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red._fields<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>(&#8216;red&#8217;, &#8216;green&#8217;, &#8216;blue&#8217;)<\/p>\n<\/div>\n<h4>6. Changing a Value<\/h4>\n<p>Yes, a namedtuple\u2019s attributes are immutable. But we can use the _replace() function to change them.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red._replace(green=1)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Colors(red=255, green=1, blue=0)<\/p>\n<\/div>\n<h3>Benefits of Python Namedtuple<\/h3>\n<p>Of course, no one would be using these if they observed no benefits at all. So, here we go:<br \/>\n1. Unlike a regular tuple, Python namedtuple can also access values using the names of the fields.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; red.red<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">255<\/div>\n<p>2. Python namedtuple is just as memory-efficient as a regular tuple, because it does not have per-instance dictionaries. This is also why it is faster than a dictionary.<\/p>\n<h3>Python Interview Questions on Namedtuple<\/h3>\n<p>1. What is a Namedtuple in Python?<\/p>\n<p>2. How does Namedtuple work in Python?<\/p>\n<p>3. What does Namedtuple return in Python?<\/p>\n<p>4. How do you create a Namedtuple in Python?<\/p>\n<p>5. Is Namedtuple immutable?<\/p>\n<h3>Conclusion<\/h3>\n<p>Today, we learned about Python namedtuple. It is just like a regular tuple, apart from the fact that it can also access fields through their names. namedtuple builds lightweight classes with named fields, giving tuple speed and memory perks yet dot access clarity.<\/p>\n<p>This is easy on the programmer. It is also more memory-efficient than a dictionary.<\/p>\n<p>Next, we will discuss some more functions from the collections module. Till give us your valuable feedback.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our journey so far, we have seen Python tuples, which is an important container type. Today, we will talk about Python namedtuple with its example &amp; syntax. Moreover, we will start our learning&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":7353,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[1785,2450,2497,9002,10709,10711,10712,10713,14091,16277],"class_list":["post-7336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-benefits-of-python-namedtuple","tag-changing-a-value","tag-checking-what-fields-belong-to-a-tuple","tag-namedtuple-in-python","tag-python-namedtuple","tag-python-namedtuple-benefits","tag-python-namedtuple-is-immutable","tag-python-namedtuple-syntax","tag-syntax-of-python-namedtuple","tag-working-with-python-namedtuple"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Namedtuple - Working and Benefits of Namedtuple in Python - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Python tuple, syntax, working &amp; Benefits of namedtuple in python, Accessing Elements in a Python namedtuple etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-namedtuple\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Namedtuple - Working and Benefits of Namedtuple in Python - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Python tuple, syntax, working &amp; Benefits of namedtuple in python, Accessing Elements in a Python namedtuple etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-namedtuple\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-06T07:33:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-22T10:26:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Namedtuple - Working and Benefits of Namedtuple in Python - DataFlair","description":"Learn about Python tuple, syntax, working & Benefits of namedtuple in python, Accessing Elements in a Python namedtuple etc.","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:\/\/data-flair.training\/blogs\/python-namedtuple\/","og_locale":"en_US","og_type":"article","og_title":"Python Namedtuple - Working and Benefits of Namedtuple in Python - DataFlair","og_description":"Learn about Python tuple, syntax, working & Benefits of namedtuple in python, Accessing Elements in a Python namedtuple etc.","og_url":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-02-06T07:33:39+00:00","article_modified_time":"2026-04-22T10:26:33+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python Namedtuple &#8211; Working and Benefits of Namedtuple in Python","datePublished":"2018-02-06T07:33:39+00:00","dateModified":"2026-04-22T10:26:33+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/"},"wordCount":931,"commentCount":4,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg","keywords":["Benefits of Python Namedtuple","Changing a Value","Checking what fields belong to a tuple","Namedtuple in Python","Python Namedtuple","Python Namedtuple Benefits","Python namedtuple is Immutable","Python namedtuple Syntax","Syntax of Python namedtuple","Working With Python namedtuple"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-namedtuple\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/","url":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/","name":"Python Namedtuple - Working and Benefits of Namedtuple in Python - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg","datePublished":"2018-02-06T07:33:39+00:00","dateModified":"2026-04-22T10:26:33+00:00","description":"Learn about Python tuple, syntax, working & Benefits of namedtuple in python, Accessing Elements in a Python namedtuple etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-namedtuple\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Python-namedtuple-01.jpg","width":1200,"height":628,"caption":"introduction to Python Namedtuple"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-namedtuple\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Namedtuple &#8211; Working and Benefits of Namedtuple in Python"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=7336"}],"version-history":[{"count":12,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7336\/revisions"}],"predecessor-version":[{"id":147781,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7336\/revisions\/147781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/7353"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=7336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=7336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=7336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}