

{"id":6016,"date":"2018-01-17T10:32:48","date_gmt":"2018-01-17T05:02:48","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=6016"},"modified":"2026-04-28T14:41:53","modified_gmt":"2026-04-28T09:11:53","slug":"python-generator","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-generator\/","title":{"rendered":"Python Generator &#8211; Python Generator Expressions"},"content":{"rendered":"<p>In our last Python Tutorial, we studied Python functions. Today, in this Python Generator tutorial, we will study what a generator in Python programming is.<\/p>\n<p>Along with this, we will discuss Python Generator Expressions, Python list vs generator, and Python Function vs Generators.<\/p>\n<p>So, let&#8217;s start the Python Generator Tutorial.<\/p>\n<div id=\"attachment_6017\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6017\" class=\"wp-image-6017 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators.jpg\" alt=\"Python Generator - Python Generator Expressions (Best Lesson)\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Generators-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-6017\" class=\"wp-caption-text\">Python Generator &#8211; Python Generator Expressions (Best Lesson)<\/p><\/div>\n<h3>Define Python Generator?<\/h3>\n<p>A Python generator is a kind of iterable, like a Python list or a Python tuple. It generates for us a sequence of values that we can iterate on.<\/p>\n<p>You can use it to iterate on a for-loop in Python, but you can\u2019t index it. Let\u2019s take a look at how to create one with a Python generator example.<\/p>\n<p><strong>Function of a generator in Python:<\/strong><\/p>\n<ul>\n<li><strong>Saves memory:<\/strong> It saves the system from slowing down as it calculates the next value only if required.<\/li>\n<li><strong>Knows where it left:<\/strong> When a generator yield statement is being hit, it pauses the code, and when it resumes, it starts from the part where it was stopped.<\/li>\n<li><strong>Infinite data:<\/strong> Since it creates one data point at a time, the code will run while having a lot of space in it.<\/li>\n<\/ul>\n<h3>The Syntax of Generator in Python 3<\/h3>\n<p>To create a Python generator, we use the yield statement, inside a function, instead of the return statement. Let\u2019s take a quick example.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def counter():\r\n     i=1\r\n     while(i&lt;=10):\r\n          yield i\r\n          i+=1<\/pre>\n<p>With this, we defined a Python generator called counter() and assigned 1 to the local variable i. As long as i is less than or equal to 10, the loop will execute.<\/p>\n<p>Inside the loop, we yield the value of I, and then increment it.<\/p>\n<p>Then, we iterate on this generator using the for-loop.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; for i in counter():\r\n         print(i)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<br \/>\n9<br \/>\n10<\/div>\n<h3>Working of Python Generator<\/h3>\n<p>To understand how this code works, we\u2019ll start with the for-loop. For each item in the Python generator (each item that it yields), it prints it, here.<\/p>\n<p>We begin with i=1. So, the first item that it yields is 1. The for-loop prints this because of our print statement. Then, we increment I to 2.<\/p>\n<p>And the process follows until i is incremented to 11. Then, the while loop\u2019s condition becomes False.<\/p>\n<p>However, if you forget the statement to increment I, it results in an infinite generator. This is because a Python generator needs to hold only one value at a time.<\/p>\n<p>So, there are no memory restrictions.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def even(x):\r\n  while x%2==0:\r\n    yield 'Even'\r\n&gt;&gt;&gt; for i in even(2):\r\n  print(i)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Even<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEven<br \/>\nEvenEvenTraceback (most recent call last):File &#8220;&lt;pyshell#24&gt;&#8221;, line 2, in &lt;module&gt;print(i)KeyboardInterrupt<\/div>\n<p>Here, since 2 is even, 2%2 is always 0. Hence, the condition for while is always true.<\/p>\n<p>Because of this, the Python3 generator even() keeps yielding the value True until we hit Ctrl+C on the keyboard to interrupt the execution.<\/p>\n<p>Note that a generator may contain more than one Python yield statement. This is comparable to how a Python generator function may contain more than one return statement.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def my_gen(x):\r\n  while(x&gt;0):\r\n    if x%2==0:\r\n      yield 'Even'\r\n    else:\r\n      yield 'Odd'\r\n    x-=1\r\n&gt;&gt;&gt; for i in my_gen(7):\r\n  print(i)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Odd<br \/>\nEven<br \/>\nOdd<br \/>\nEven<br \/>\nOdd<br \/>\nEven<br \/>\nOdd<\/div>\n<h3>Yielding into a Python List<\/h3>\n<p>This one\u2019s a no-brainer. If you apply the list() function to the call to the Python generator, it will return a list of the yielded values, in the order in which they are yielded.<\/p>\n<p>Here, we take an example that creates a list of squares of numbers, on the condition that the squares are even.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def even_squares(x):\r\n  for i in range(x):\r\n    if i**2%2==0:\r\n      yield i**2<\/pre>\n<p>To create a list, we just apply the list() function to the call to this Python generator. We do not iterate on it using a for-loop.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; print(list(even_squares(10)))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">[0, 4, 16, 36, 64]<\/div>\n<p>As you can see, in numbers 1 to 9 (not 10, because range(10) gives us 0 to 9), the even squares are 0, 4, 16, 36, and 64. The others, that are 1, 9, 25, 49, 81 are odd. So, they\u2019re not yielded.<\/p>\n<h3>Python List vs Generator in Python<\/h3>\n<p>This is a very simple difference. A list holds a number of values at once. But a Python generator holds only one value at a time, the value to yield.<\/p>\n<p>This is why it needs much less space compared to a list. With a generator, we also don\u2019t need to wait until all the values are rendered.<\/p>\n<h3>Python Generator vs Function<\/h3>\n<p>Now, to compare a generator to a function, we first talk about return and Python yield.<\/p>\n<p>When the interpreter reaches the return statement in a function, it stops executing the Python Generator function and executes the statement after the function call.<\/p>\n<p>However, when it reaches the Python yield statement in a generator, it yields the value to the iterable. Finally, it gets back to the generator to continue for the next value.<\/p>\n<p>Also, when a function stops executing, its local variables are destroyed. This is not the same with a Python generator. Take a look.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def mygen():\r\n  i=7\r\n  while i&gt;0:\r\n    yield i\r\n    i-=1\r\n&gt;&gt;&gt; for i in mygen():\r\n  print(i)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">7<br \/>\n6<br \/>\n5<br \/>\n4<br \/>\n3<br \/>\n2<br \/>\n1<\/div>\n<h3>Python Generator Expressions<\/h3>\n<p>Just like a list comprehension, we can use expressions to create Python generator shorthand. Let\u2019s take a list for this.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; mylist=[1,3,6,10]\r\n&gt;&gt;&gt; (x**2 for x in mylist)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">&lt;generator object &lt;genexpr&gt; at 0x003CC330&gt;<\/div>\n<p>As is visible, this gave us a Python generator object. But to access the values, we need to store this into a variable, and then apply the next() function to it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; a=(x**2 for x in mylist)\r\n&gt;&gt;&gt; next(a)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">1<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; next(a)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">9<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; next(a)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">36<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; next(a)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">100<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; next(a)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#89&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>next(a)<\/p>\n<p>StopIteration<\/p>\n<\/div>\n<p>So, this was all about Python Generator Tutorial. Hope you like our explanation.<\/p>\n<h3>Python Interview Questions on Generators<\/h3>\n<ol>\n<li>What are generators in Python?<\/li>\n<li>Why are generators used in Python?<\/li>\n<li>What is the difference between generators and iterators in Python?<\/li>\n<li>Which keyword is used for a generator in Python?<\/li>\n<li>How is a generator function recognized in Python?<\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<p>Now that you know the benefits of Python generators over a list or over a function, you will understand their importance.<\/p>\n<p>Some things we can do with a generator, with a function, or even with a list comprehension. But using a Python generator is the most efficient.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last Python Tutorial, we studied Python functions. Today, in this Python Generator tutorial, we will study what a generator in Python programming is. Along with this, we will discuss Python Generator Expressions,&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":26384,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[5049,5050,10550,10554,10556,10648,10933],"class_list":["post-6016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-generators-expressions-in-python","tag-generators-in-python","tag-python-function-vs-generator","tag-python-generator-functions","tag-python-generators","tag-python-list-vs-generator","tag-python-yield"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Generator - Python Generator Expressions - DataFlair<\/title>\n<meta name=\"description\" content=\"Python generator Tutorial -Python yield, generator expressions in python, difference between generator vs list in python, python generator vs function\" \/>\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-generator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Generator - Python Generator Expressions - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Python generator Tutorial -Python yield, generator expressions in python, difference between generator vs list in python, python generator vs function\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-generator\/\" \/>\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-01-17T05:02:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-28T09:11:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.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 Generator - Python Generator Expressions - DataFlair","description":"Python generator Tutorial -Python yield, generator expressions in python, difference between generator vs list in python, python generator vs function","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-generator\/","og_locale":"en_US","og_type":"article","og_title":"Python Generator - Python Generator Expressions - DataFlair","og_description":"Python generator Tutorial -Python yield, generator expressions in python, difference between generator vs list in python, python generator vs function","og_url":"https:\/\/data-flair.training\/blogs\/python-generator\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-17T05:02:48+00:00","article_modified_time":"2026-04-28T09:11:53+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.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-generator\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python Generator &#8211; Python Generator Expressions","datePublished":"2018-01-17T05:02:48+00:00","dateModified":"2026-04-28T09:11:53+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/"},"wordCount":993,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.jpg","keywords":["generators expressions in python","generators in python","python function vs generator","python generator functions","python generators","python list vs generator","python yield"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-generator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-generator\/","url":"https:\/\/data-flair.training\/blogs\/python-generator\/","name":"Python Generator - Python Generator Expressions - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.jpg","datePublished":"2018-01-17T05:02:48+00:00","dateModified":"2026-04-28T09:11:53+00:00","description":"Python generator Tutorial -Python yield, generator expressions in python, difference between generator vs list in python, python generator vs function","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-generator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-Generators-1.jpg","width":1200,"height":628,"caption":"Python-Generators"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-generator\/#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 Generator &#8211; Python Generator Expressions"}]},{"@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\/6016","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=6016"}],"version-history":[{"count":14,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/6016\/revisions"}],"predecessor-version":[{"id":148011,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/6016\/revisions\/148011"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/26384"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=6016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=6016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=6016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}