

{"id":5826,"date":"2018-01-11T10:05:49","date_gmt":"2018-01-11T04:35:49","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=5826"},"modified":"2026-04-14T15:40:32","modified_gmt":"2026-04-14T10:10:32","slug":"python-method","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-method\/","title":{"rendered":"Python Method &#8211; Classes, Objects and Functions in Python"},"content":{"rendered":"<p>In our last tutorial, we discussed\u00a0functions in Python. Today, in this Python Method Tutorial, we will discuss what is a method in Python Programming Language.<\/p>\n<p>Moreover, we will learn Python Class Method and Python Object. Along with this, we will study the python functions.<\/p>\n<p>So, let&#8217;s start Python Class and Object.<\/p>\n<h3>What is a Python Method?<\/h3>\n<p>You are aware of the fact that Python is an object-oriented language, right? This means that it can deal with classes and objects to model the real world.<\/p>\n<p>A method is a function that lives inside a class. Because it is part of a class, it can see and change that class\u2019s data. For example, bark() inside Dog can print the dog\u2019s name before barking.<\/p>\n<p>Methods make objects act in useful ways. A calculator class may have methods like add(), subtract(), and clear(). Calling them feels natural\u2014calc.add(5)\u2014and keeps logic in one neat place.<\/p>\n<p>But before we begin getting any deeper, let\u2019s take a quick look at classes and objects.<\/p>\n<h3>Python Class Method<\/h3>\n<p>A Python Class is an Abstract Data Type (ADT). Think of it like a blueprint. A rocket made according to its blueprint is according to plan.<\/p>\n<p>It has all the properties mentioned in the plan and behaves accordingly. Likewise, a class is a blueprint for an object.<\/p>\n<p>To take an example, we would suggest thinking of a car. The class \u2018Car\u2019 contains properties like brand, model, color, fuel, and so.<\/p>\n<p>It also holds behavior like start(), halt(), drift(), speedup(), and turn(). An object Hyundai Verna has the following properties:<\/p>\n<p>brand: \u2018Hyundai\u2019<\/p>\n<p>model: \u2018Verna\u2019<\/p>\n<p>color: \u2018Black\u2019<\/p>\n<p>fuel: \u2018Diesel\u2019<\/p>\n<p>Here, this is an object of the class Car, and we may choose to call it \u2018car1\u2019 or \u2018blackverna\u2019.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Car:\r\n          def __init__(self,brand,model,color,fuel):\r\n                  self.brand=brand\r\n                  self.model=model\r\n                  self.color=color\r\n                  self.fuel=fuel\r\n           def start(self):\r\n                  pass\r\n           def halt(self):\r\n                  pass\r\n           def drift(self):\r\n                  pass\r\n           def speedup(self):\r\n                  pass\r\n           def turn(self):\r\n                  pass<\/pre>\n<h3>Python Objects<\/h3>\n<p>An object in Python is an instance of a class. It can have properties and behavior. We just created the class Car.<\/p>\n<p>Now, let\u2019s create an object blackverna from this class.<\/p>\n<p>Remember that you can use a class to create as many objects as you want.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; blackverna=Car('Hyundai','Verna','Black','Diesel')<\/pre>\n<p>This creates a Car object, called blackverna, with the aforementioned attributes.<\/p>\n<p>We did this by calling the class like a function (the syntax).<\/p>\n<p>Now, let\u2019s access its fuel attribute. To do this, we use the dot operator in Python(.).<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; blackverna.fuel<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">&#8216;Diesel&#8217;<\/div>\n<h3>Python Method<\/h3>\n<p>A method in Python is like a Python function, but it must be called on an object.<\/p>\n<p>And to create it, you must put it inside a class.<\/p>\n<p>Now in this Car class, we have five methods, namely, start(), halt(), drift(), speedup(), and turn().<\/p>\n<p>In this example, we put the pass statement in each of these because we haven\u2019t decided what to do yet.<\/p>\n<p>Let\u2019s call the drift() Python method on blackverna.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; blackverna.drift()\r\n&gt;&gt;&gt;<\/pre>\n<p>Like a function, a method has a name, may take parameters, and has a return statement.<\/p>\n<p>Let\u2019s take an example for this.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Try:\r\n        def __init__(self):\r\n                pass\r\n        def printhello(self,name):\r\n                print(f\"Hello, {name}\")\r\n                return name\r\n&gt;&gt;&gt; obj=Try()\r\n&gt;&gt;&gt; obj.printhello('Ayushi')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Hello, Ayushi&#8217;Ayushi&#8217;<\/p>\n<\/div>\n<p>Here, the method printhello() has a name, takes a parameter, and returns a value.<\/p>\n<ul>\n<li><strong>An interesting discovery<\/strong>&#8211; When we first defined the class Car, we did not pass the \u2018self\u2019 parameter to the five methods of the class. This worked fine with the attributes, but when we called the drift() method on blackverna, it gave us this error:<\/li>\n<\/ul>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#19&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>blackverna.drift()<\/p>\n<p>TypeError: drift() takes 0 positional arguments but 1 was given<\/p>\n<\/div>\n<p>From this error, we figured that we were missing the \u2018self\u2019 parameter to all those methods.<\/p>\n<p>Then we added it to all of them, and called drift() on blackverna again. It still didn\u2019t work.<\/p>\n<p>Finally, we declared the blackverna object again, and then called drift() on it. This time, it worked without an issue.<\/p>\n<p>Make out of this information what you will.<\/p>\n<h3>__init__() function in python<\/h3>\n<p>If you\u2019re familiar with any other object-oriented language, you know about constructors.<\/p>\n<p>In C++, a constructor is a special function, with the same name as the class, used to initialize the class\u2019s attributes.<\/p>\n<p>Here in Python, __init__() is the method we use for this purpose.<\/p>\n<p>Let\u2019s see the __init__ part of another class.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Animal:\r\n       def __init__(self,species,gender):\r\n                 self.species=species\r\n                 self.gender=gender\r\n&gt;&gt;&gt; fluffy=Animal('Dog','Female')\r\n&gt;&gt;&gt; fluffy.gender<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&#8216;Female&#8217;<\/p>\n<\/div>\n<p>Here, we used __init__ to initialize the attributes \u2018species\u2019 and \u2018gender\u2019.However, you don\u2019t need to define this function if you don\u2019t need it in your code.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Try2:\r\n        def hello(self):\r\n            print(\"Hello\")\r\n&gt;&gt;&gt; obj2=Try2()\r\n&gt;&gt;&gt; obj2.hello()<\/pre>\n<p>Init is a magic method, which is why it has double underscores before and after it.<\/p>\n<p>We will learn about magic methods in a later section in this article.<\/p>\n<h3>Python Self Parameter<\/h3>\n<p>You would have noticed until now that we\u2019ve been using the \u2018self\u2019 parameter with every method, even the __init__().<\/p>\n<p>Self parameter in Python tells the interpreter to deal with the current object. It is like the \u2018this\u2019 keyword in Java.<\/p>\n<p><strong>Characteristics of the self parameter in Python:<\/strong><\/p>\n<ul>\n<li><strong>Refer to the object:<\/strong> It keeps a note of every object being used, so that the object can keep its own data.<\/li>\n<li><strong>Naming rule:<\/strong> Self is not a special name; it is a recommended name.<\/li>\n<\/ul>\n<p>Let\u2019s take another code to see how this works.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Fruit:\r\n        def printstate(self,state):\r\n               print(f\"The orange is {state}\")\r\n&gt;&gt;&gt; orange=Fruit()\r\n&gt;&gt;&gt; orange.printstate(\"ripe\")<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>The orange is ripe<\/p>\n<\/div>\n<p>As you can see, the \u2018self\u2019 parameter told the method to operate on the current object, that is, orange.<\/p>\n<p>Let\u2019s take another example.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Result:\r\n            def __init__(self,phy,chem,math):\r\n                          self.phy=phy\r\n                          self.chem=chem\r\n                          self.math=math\r\n            def printavg(self):\r\n                          print(f\"Average={(self.phy+self.chem+self.math)\/3}\")\r\n&gt;&gt;&gt; rollone=Result(86,95,85)\r\n&gt;&gt;&gt; rollone.chem<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>95<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; rollone.printavg()<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Average=88.66666666666667<\/p>\n<\/div>\n<p>You can also assign values directly to the attributes, instead of relying on arguments.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class LED:\r\n        def __init__(self):\r\n                  self.lit=False\r\n&gt;&gt;&gt; obj=LED()\r\n&gt;&gt;&gt; obj.lit<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>False<\/p>\n<\/div>\n<p>Finally, we\u2019d like to say that \u2018self\u2019 isn\u2019t a keyword.<\/p>\n<p>You can use any name instead of it, provided that it isn\u2019t a reserved keyword, and follows the rules for naming an identifier.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; class Try3:\r\n         def __init__(thisobj,name):\r\n                   thisobj.name=name\r\n&gt;&gt;&gt; obj1=Try3('Leo')\r\n&gt;&gt;&gt; obj1.name<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>&#8216;Leo&#8217;<\/p>\n<\/div>\n<p>This was all about the Python Self Parameter<\/p>\n<h3>Functions vs. Methods in Python<\/h3>\n<p>We think we\u2019ve learned enough about methods by now to be able to compare them to functions.<\/p>\n<p>A function differs from a method in the following ways.<\/p>\n<p>1. While a method is called on an object, a function is generic.<\/p>\n<p>2. Since we call a method on an object, it is associated with it. Consequently, it is able to access and operate on the data within the class.<\/p>\n<p>3. A method may alter the state of the object; a function does not, when an object is passed as an argument to it. We have seen this in our tutorial on tuples.<\/p>\n<h3>Magic Methods in Python<\/h3>\n<p>Another construct that Python provides us with is Python magic methods. Magic methods in Python are represented by double underscores before and after their name.<\/p>\n<p>Another name for a magic method is a dunder.<\/p>\n<p>A magic method is used to implement functionality that can\u2019t be represented as a normal method.<\/p>\n<p>__init__() isn\u2019t the only magic method in Python; we will read more about it in a future lesson.<\/p>\n<p>But for now, we\u2019ll just name some of the magic methods:<\/p>\n<p>__add__ for +<\/p>\n<p>__sub__ for \u2013<\/p>\n<p>__mul__ for *<\/p>\n<p>__and__ for &amp;<\/p>\n<p>The list, however, does not end here.<\/p>\n<p>This was all about the Method in Python.<\/p>\n<h3>Python Interview Questions on Methods<\/h3>\n<p>1. How many methods are there in Python?<\/p>\n<p>2. What are the built-in methods in Python?<\/p>\n<p>3. How do you create a method in Python?<\/p>\n<p>4. How do you add a method to a class in Python?<\/p>\n<p>5. How do you call a method from one class to another in Python?<\/p>\n<h3>Conclusion<\/h3>\n<p>A Python method, as we know it, is much like a function, except for the fact that it is associated with an object.<\/p>\n<p>Now you know how to define a method in python, and make use of the __init__ method and the self-parameter, or whatever you choose to call it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last tutorial, we discussed\u00a0functions in Python. Today, in this Python Method Tutorial, we will discuss what is a method in Python Programming Language. Moreover, we will learn Python Class Method and Python&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":35902,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[8479,8690,8701,10415,10551,10683],"class_list":["post-5826","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-magic-method-in-python","tag-methods-in-python","tag-methods-vs-functions-in-python","tag-python-classes","tag-python-functions","tag-python-methods"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Method - Classes, Objects and Functions in Python - DataFlair<\/title>\n<meta name=\"description\" content=\"Python Method Tutorial - Python class, object and Class Method, Python Magic Methods with syntax &amp; Example,Python Functions vs Method\" \/>\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-method\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Method - Classes, Objects and Functions in Python - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Python Method Tutorial - Python class, object and Class Method, Python Magic Methods with syntax &amp; Example,Python Functions vs Method\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-method\/\" \/>\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-11T04:35:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-14T10:10:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Method - Classes, Objects and Functions in Python - DataFlair","description":"Python Method Tutorial - Python class, object and Class Method, Python Magic Methods with syntax & Example,Python Functions vs Method","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-method\/","og_locale":"en_US","og_type":"article","og_title":"Python Method - Classes, Objects and Functions in Python - DataFlair","og_description":"Python Method Tutorial - Python class, object and Class Method, Python Magic Methods with syntax & Example,Python Functions vs Method","og_url":"https:\/\/data-flair.training\/blogs\/python-method\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-11T04:35:49+00:00","article_modified_time":"2026-04-14T10:10:32+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-method\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python Method &#8211; Classes, Objects and Functions in Python","datePublished":"2018-01-11T04:35:49+00:00","dateModified":"2026-04-14T10:10:32+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/"},"wordCount":1267,"commentCount":10,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-1.jpg","keywords":["magic method in python","methods in python","methods vs functions in python","python classes","python functions","python methods"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-method\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-method\/","url":"https:\/\/data-flair.training\/blogs\/python-method\/","name":"Python Method - Classes, Objects and Functions in Python - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-1.jpg","datePublished":"2018-01-11T04:35:49+00:00","dateModified":"2026-04-14T10:10:32+00:00","description":"Python Method Tutorial - Python class, object and Class Method, Python Magic Methods with syntax & Example,Python Functions vs Method","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-method\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-method\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-method\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Methods-in-Python-1.jpg","width":1200,"height":628,"caption":"Python Method - Classes, Objects and Functions in Python"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-method\/#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 Method &#8211; Classes, Objects and Functions 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\/5826","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=5826"}],"version-history":[{"count":17,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5826\/revisions"}],"predecessor-version":[{"id":147617,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5826\/revisions\/147617"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/35902"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=5826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=5826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=5826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}