

{"id":26310,"date":"2018-08-27T05:30:41","date_gmt":"2018-08-27T00:00:41","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=26310"},"modified":"2026-04-13T18:12:50","modified_gmt":"2026-04-13T12:42:50","slug":"python-eval-function","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-eval-function\/","title":{"rendered":"Python eval Function &#8211; Examples &amp; Uses"},"content":{"rendered":"<p>Have you ever wondered how Python can execute code when it is written as a string? Here, eval plays an important role as Python checks and calculates expressions during runtime, which makes the programs more flexible and interactive.<\/p>\n<p><span style=\"font-weight: 400\">Today, in this Python tutorial, we will see the Python eval function. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, we will understand the eval function in Python with examples. Also, we will look at uses and vulnerabilities in eval().<\/span><\/p>\n<p>So, let&#8217;s start the Python eval tutorial.<\/p>\n<h3>What is the Python eval Function?<\/h3>\n<p><span style=\"font-weight: 400\">eval() in Python is a built-in function or method to which we pass an expression. It parses this expression and runs it as we execute the program.<\/span><\/p>\n<p>eval() reads a string and treats it as Python code, then returns the value it produces. For example, eval(&#8220;3 + 4&#8221;) gives 7. This dynamic ability can be handy for tiny calculators or user-built formulas.<\/p>\n<p><span style=\"font-weight: 400\">Let\u2019s take a look at the syntax first.<\/span><\/p>\n<h4>1. The syntax of the Python eval() Function<\/h4>\n<p><span style=\"font-weight: 400\">Observe the following syntax for the eval function in Python:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">eval(expression, globals=None, locals=None)<\/pre>\n<p><span style=\"font-weight: 400\">What does this tell us about Python eval()? What are the parameters of Python eval Function?<\/span><\/p>\n<h4>2. Python eval Function with Parameters<\/h4>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Expression in Python eval()-<\/strong> This is the string to parse and evaluate<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Globals in eval()-<\/strong> This is a dictionary that holds available global methods and variables, and is an optional parameter<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\"><strong>Python eval Locals-<\/strong> This is a mapping object that holds available local methods and variables, and is an optional parameter. We know that the standard mapping type in Python is a dictionary.<\/span><\/li>\n<\/ul>\n<h3>Python eval Example<\/h3>\n<p><span style=\"font-weight: 400\">Let\u2019s take a simple example of the Python eval() Function.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; x=7\r\n&gt;&gt;&gt; eval('x**2')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>49<\/p>\n<\/div>\n<p><span style=\"font-weight: 400\">In this eval function in Python example, we initialize x to 7. We then pass a<em> string<\/em> to eval that, we expect, will square the value of x and stuff it into x. <\/span><\/p>\n<p><span style=\"font-weight: 400\">We see that it works fine. eval in Python evaluates the expression x**2 to get to the value 49 and then prints it.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now, let\u2019s try another Python eval() example.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; eval('[2,3,4][1]')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">3<\/div>\n<p><span style=\"font-weight: 400\">This converts the string to the list [2,3,4] and returns the value at position 1, that is, 3.<\/span><span style=\"font-weight: 400\">However, eval() in Python does not compile, only evaluates:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; eval('if 3&gt;1: print(\"Okay\")')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\nFile &#8220;&lt;pyshell#59&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\neval(&#8216;if 3&gt;1: print(&#8220;Okay&#8221;)&#8217;)<br \/>\nFile &#8220;&lt;string&gt;&#8221;, line 1<br \/>\nif 3&gt;1: print(&#8220;Okay&#8221;)<br \/>\n^<br \/>\n<span style=\"font-weight: 400\">SyntaxError: invalid syntax<\/span><\/div>\n<h3>Getting the Expression From the User in Python<\/h3>\n<p><span style=\"font-weight: 400\">In the examples so far, we hardcoded the expression. What if we wanted to let the user provide one instead?<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; expr=input('Enter an expression as x')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter an expression as x3*x**3+2*x**2+x+6<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; x=int(input('Enter the value of x'))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter the value of x2<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; eval(expr)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>40<\/p>\n<\/div>\n<p><span style=\"font-weight: 400\">Here, we take the expression from the user, then we take the value of x and convert it to an integer. Finally, we call eval() on the expression and evaluate it to reach a value of 40.<\/span><\/p>\n<h3>Vulnerabilities With Eval in Python<\/h3>\n<p><span style=\"font-weight: 400\">So this is useful, but it can also be used against us since it executes anything we pass to it(somewhat like SQL injection). Let\u2019s see how. The user can:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Call a dangerous function<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Expose hidden values<\/span><\/li>\n<\/ul>\n<div id=\"attachment_26336\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-26336\" class=\"wp-image-26336 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01.jpg\" alt=\"Python eval Function\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Vulnerabilities-With-Eval-in-Python-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-26336\" class=\"wp-caption-text\">Vulnerabilities With Python eval Function<\/p><\/div>\n<h4>1. Exploiting Eval in Python<\/h4>\n<p><span style=\"font-weight: 400\">Imagine having a function in your code that returns some kind of password or other confidential data. <\/span><\/p>\n<p><span style=\"font-weight: 400\">A user can make a call to this function through Python eval() and make their way to the piece of sensitive data.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def let_me_in():\r\n         password='@dc#431'\r\n         print(\"The password is\",password)\r\n&gt;&gt;&gt; expr=input('Enter an expression as x')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter an expression as xlet_me_in()<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; eval(expr)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>The password is @dc#431<\/p>\n<\/div>\n<p><span style=\"font-weight: 400\">Did you see how easy it was to extract the password from the code? All it took was one call to a function.<\/span><\/p>\n<h4>1. Protecting Python Eval from exploitation<\/h4>\n<p><span style=\"font-weight: 400\">Now consider you have imported the os module for some reason. How would you like a user to be able to read and write your files, or worse, delete them? <\/span><\/p>\n<p><span style=\"font-weight: 400\">This is possible using the command <strong>os.system(&#8216;rm -rf *&#8217;).<\/strong> This could pose higher risks when working with applications like web apps and kiosk computers.<\/span><\/p>\n<p><span style=\"font-weight: 400\">So what do we do? Well, for one, it is possible to pass a list of functions and variables to eval. This means it can access only these functions and variables. We pass this as a Python eval dictionary. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Confused? Take a look:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def let_me_in():\r\n        password='@dc#431'\r\n        print(\"The password is\",password)\r\n&gt;&gt;&gt; expr=input('Enter an expression as x')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter an expression as x3*x**3+2*x**2+x+6<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; x=int(input('Enter the value of x'))<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter the value of x2<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; safe_dict={}\r\n&gt;&gt;&gt; safe_dict['x']=x\r\n&gt;&gt;&gt; eval(expr,safe_dict)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>40<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; expr=input('Enter an expression as x')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Enter an expression as xlet_me_in()<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; eval(expr,safe_dict)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\nFile &#8220;&lt;pyshell#56&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\neval(expr,safe_dict)<br \/>\nFile &#8220;&lt;string&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\nNameError: name &#8216;let_me_in&#8217; is not defined<\/div>\n<p><span style=\"font-weight: 400\">Works fine. <\/span><br \/>\n<span style=\"font-weight: 400\">Now, let\u2019s talk about the uses of eval.<\/span><\/p>\n<h3>Uses of eval in Python<\/h3>\n<p><span style=\"font-weight: 400\">While used sparingly because of its vulnerabilities, Python eval() manages to find use in some situations-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To allow users to enter own scriptlets to allow customization of a complex system\u2019s behavior.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To evaluate mathematical expressions in applications instead of writing an expression parser.<\/span><\/li>\n<\/ul>\n<h3>A Final Python eval Example<\/h3>\n<p><span style=\"font-weight: 400\">So before we leave, let\u2019s take a rather practical example of Python eval() Function.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def double(n):\r\n        return n*2\r\n&gt;&gt;&gt; def triple(n):\r\n        return n*3\r\n&gt;&gt;&gt; choice=input('What would you like to do?')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>What would you like to do?triple<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; num=input('What number?')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>What number?7<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; choice+='('+num+')'\r\n&gt;&gt;&gt; eval(choice)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\"><span style=\"font-family: Verdana, Geneva, sans-serif\">21<\/span><\/div>\n<p><span style=\"font-weight: 400\">Here, we provide the user with a choice- to double or triple a number of her\/his choice. We use eval to make this happen.<\/span><\/p>\n<h3>Python Interview Questions on eval function<\/h3>\n<p>1. What is the Python eval function? Explain with an example.<\/p>\n<p>2. What does eval() do in Python?<\/p>\n<p>3. Explain the difference between eval and int in Python?<\/p>\n<p>4. What does eval mean in Python?<\/p>\n<p>5. How do you use eval in Python?<\/p>\n<h3>Conclusion<\/h3>\n<p><span style=\"font-weight: 400\">Hence, we discussed the Python eval() function and how and where to use it. Keep eval only for controlled cases, such as quick debugging or internal config math. Good security practice is to build a white list of allowed names and pass it through the globals and locals parameters to fence off dangerous attributes.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wondered how Python can execute code when it is written as a string? Here, eval plays an important role as Python checks and calculates expressions during runtime, which makes the programs&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":26331,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[4218,4471,10513,10514,10516,10519,15254,15862],"class_list":["post-26310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-eval-function-in-python","tag-exploiting-eval-in-python","tag-python-eval-dictionary","tag-python-eval-example","tag-python-eval-function","tag-python-eval-locals","tag-uses-of-eval-in-python","tag-what-is-python-eval-function"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python eval Function - Examples &amp; Uses - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn what the Python Eval Function is and how eval plays an important role as Python checks and calculates expressions during runtime.\" \/>\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-eval-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python eval Function - Examples &amp; Uses - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn what the Python Eval Function is and how eval plays an important role as Python checks and calculates expressions during runtime.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-eval-function\/\" \/>\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-08-27T00:00:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-13T12:42:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-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 eval Function - Examples &amp; Uses - DataFlair","description":"Learn what the Python Eval Function is and how eval plays an important role as Python checks and calculates expressions during runtime.","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-eval-function\/","og_locale":"en_US","og_type":"article","og_title":"Python eval Function - Examples &amp; Uses - DataFlair","og_description":"Learn what the Python Eval Function is and how eval plays an important role as Python checks and calculates expressions during runtime.","og_url":"https:\/\/data-flair.training\/blogs\/python-eval-function\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-08-27T00:00:41+00:00","article_modified_time":"2026-04-13T12:42:50+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-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-eval-function\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python eval Function &#8211; Examples &amp; Uses","datePublished":"2018-08-27T00:00:41+00:00","dateModified":"2026-04-13T12:42:50+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/"},"wordCount":990,"commentCount":6,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-01.jpg","keywords":["Eval Function in Python","Exploiting Eval in Python","Python Eval Dictionary","python eval example","python eval function","Python Eval Locals","Uses of eval in Python","what is Python Eval Function"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-eval-function\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/","url":"https:\/\/data-flair.training\/blogs\/python-eval-function\/","name":"Python eval Function - Examples &amp; Uses - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-01.jpg","datePublished":"2018-08-27T00:00:41+00:00","dateModified":"2026-04-13T12:42:50+00:00","description":"Learn what the Python Eval Function is and how eval plays an important role as Python checks and calculates expressions during runtime.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-eval-function\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/08\/Python-eval-Function-01.jpg","width":1200,"height":628,"caption":"Python eval Function - Examples &amp; Uses"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-eval-function\/#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 eval Function &#8211; Examples &amp; Uses"}]},{"@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\/26310","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=26310"}],"version-history":[{"count":16,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/26310\/revisions"}],"predecessor-version":[{"id":147597,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/26310\/revisions\/147597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/26331"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=26310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=26310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=26310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}