{"id":74204,"date":"2019-12-12T13:55:07","date_gmt":"2019-12-12T08:25:07","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=74204"},"modified":"2024-08-22T17:52:45","modified_gmt":"2024-08-22T12:22:45","slug":"python-variables","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/python-variables\/","title":{"rendered":"Python Variables &#8211; Time to level up your coding skills"},"content":{"rendered":"<p>Let&#8217;s dive into the world of variables in Python! In this tutorial, we&#8217;ll explore how to name, use, and delete variables. But first, let&#8217;s start with the basics: what exactly are variables in Python?<\/p>\n<p>Imagine you have a box where you can store different items. In programming, a variable is like that box. It holds data that you can use and manipulate throughout your code. Curious to learn more? Let&#8217;s get started on this journey to understand Python variables better!<\/p>\n<h3>What are Python Variables?<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-variables.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-74212 aligncenter\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-variables.jpg\" alt=\"Variables in Python\" width=\"802\" height=\"420\" \/><\/a><\/h3>\n<p>Python variables are containers for storing data values.<\/p>\n<p>Let\u2019s take an example.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">name=\u2018TechVidvan\u2019<\/pre>\n<p>This is a variable. We can refer to this now with the name <strong>\u2018name\u2019<\/strong>. We do not declare the type of variable &#8211; name is <strong>\u2018TechVidvan\u2019<\/strong>.<\/p>\n<p>Let\u2019s talk about that.<\/p>\n<h4>Python is Dynamically-Typed<\/h4>\n<p>In Python, you don&#8217;t need to declare the data type of a variable when assigning a value to it. The interpreter decides the data type at runtime. There&#8217;s no need to declare a variable beforehand; you can directly assign a value to it. What&#8217;s more, a single variable can hold different types of data at different times.<\/p>\n<p>We will discuss this later.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">name=\u2018TechVidvan\u2019<\/pre>\n<p>Here, name holds a <strong>string<\/strong>.<\/p>\n<h3>Naming Variables<\/h3>\n<p>We cannot name a variable anything. A variable name is called an <strong>identifier<\/strong> and has to follow some rules:<\/p>\n<ul>\n<li>Variables can have letters (A-Z and a-z), digits(0-9) and underscores.<\/li>\n<li>It cannot begin with an underscore (_) or a digit.<\/li>\n<li>It cannot have whitespace and signs like + and -, !, @, $, #, %.<\/li>\n<li>It cannot be a reserved keyword for Python.<\/li>\n<li>Variable names are case sensitive.<\/li>\n<\/ul>\n<p>A variable\u2019s name can be made of <strong>letters<\/strong>, <strong>digits<\/strong>, and <strong>underscores<\/strong> but you cannot begin it with an underscore or a digit. You can also not use whitespace or the signs + and &#8211; in a name.<\/p>\n<p>Let\u2019s take some examples of valid variable names:<\/p>\n<ul>\n<li>fraud1<\/li>\n<li>Exploit_2<\/li>\n<li>work_of_devil<\/li>\n<\/ul>\n<p>These names are invalid:<\/p>\n<ul>\n<li>passive-aggressive<\/li>\n<li>21lies<\/li>\n<li>fake@rs<\/li>\n<\/ul>\n<p><strong>Reserved Keywords<\/strong><\/p>\n<p>Python also has some reserved words:<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-reserved-keywords.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74235 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-reserved-keywords.jpg\" alt=\"reserved words in python variables\" width=\"756\" height=\"378\" \/><\/a><\/p>\n<p>These are <strong>33 reserved words<\/strong>. They define the syntax and structure of Python. You cannot use a word from this list as a name for your variable or function.<\/p>\n<p>In this list, all words except True, False, and None are in lowercase.<\/p>\n<ul>\n<li>Variable names can be of any length but you should try to not exceed <strong>79 characters<\/strong>.<\/li>\n<li>Python variable names are case-sensitive. The variable \u2018name\u2019 is different than the variable \u2018Name\u2019.<\/li>\n<li>According to PEP8, you should name long variables names like this- long_variable_name with underscores.<\/li>\n<\/ul>\n<h3>Assigning Variables<\/h3>\n<p>Like we said, we do not declare variables, we assign them.<\/p>\n<p>This is how we assign a variable:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">name=\u2018TechVidvan\u2019\r\n\r\nname=8<\/pre>\n<p>The variable name has the value<strong> \u2018TechVidvan\u2019<\/strong>, but later, it has the value <strong>8<\/strong>. This is possible.<\/p>\n<p>We cannot assign a variable to a <strong>value<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">8=name<\/pre>\n<p><strong>SyntaxError<\/strong>: can&#8217;t assign to literal<\/p>\n<p>This gives us a SyntaxError as we cannot assign to a <strong>literal<\/strong>. You can also use foreign characters in variable names. There are many ways to assign variables.<\/p>\n<p>Let\u2019s see them.<\/p>\n<h4>1. Assigning Multiple Variables<\/h4>\n<p>You can assign different values to multiple variables in a statement.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">fname, lname=\u2018Lucifer\u2019, \u2018Satan\u2019<\/pre>\n<p>Here, <strong>fname<\/strong> is \u2018Lucifer\u2019 and <strong>lname<\/strong> is \u2018Satan\u2019. We can assign values to both fname and lname in <strong>one statement<\/strong>.<\/p>\n<h4>2. Assigning Single Value<\/h4>\n<p>You can also assign a single value to many variables.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">fname=lname=\u2019Satan\u2019<\/pre>\n<p>In this, fname and lname both are <strong>\u2018Satan\u2019<\/strong>.<\/p>\n<h4>3. Incrementing before Assigning Value<\/h4>\n<p>You do not need to declare a variable in Python, you can assign to it. But you cannot <strong>increment<\/strong> or <strong>change<\/strong> its value if you have not assigned a value to it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; Adolf+=2<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span>File &#8220;&lt;pyshell#25&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span>Adolf+=2<br \/>\nNameError: name &#8216;Adolf&#8217; is not defined<\/div>\n<p>First, you should assign a value to <strong>Adolf<\/strong>. Then you can <strong>modify<\/strong> it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; Adolf=2\r\n&gt;&gt;&gt; Adolf+=2\r\n&gt;&gt;&gt; print(Adolf)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">4<\/div>\n<h4>4. Reassigning the Variables<\/h4>\n<p>Like I said before, variables can hold different type of values any time.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; dementor=2\r\n&gt;&gt;&gt; dementor='DF'<\/pre>\n<p>The <strong>dementor<\/strong> variable was holding the value 2 but now it holds the <strong>\u2018DF\u2019<\/strong> string.<\/p>\n<h3>Scope-Local, Nonlocal and Global Variables<\/h3>\n<p>You can declare local and global variables in Python.<\/p>\n<p>Let\u2019s start with global.<\/p>\n<h4>1. Global Variables<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; count=2\r\n&gt;&gt;&gt; def func():\r\n  count+=1\r\n  print(count)<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; func()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span>File &#8220;&lt;pyshell#37&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span>func()<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span>File &#8220;&lt;pyshell#36&gt;&#8221;, line 2, in func<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span>count+=1<br \/>\nUnboundLocalError: local variable &#8216;count&#8217; referenced before assignment<\/div>\n<p>We cannot increment count in func because it looks for a <strong>local count<\/strong>. So the output is not 3, it is an <strong>UnboundLocalError<\/strong>.<\/p>\n<p>We can use the global keyword inside <strong>func<\/strong> to let it work.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; count=2\r\n&gt;&gt;&gt; def func():\r\n  global count\r\n  count+=1\r\n  print(count)\r\n\r\n\r\n&gt;&gt;&gt; func()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">3<\/div>\n<p>Now it works.<\/p>\n<p>This func function adds 1 to <strong>global count<\/strong> and prints it.<\/p>\n<h4>2. Local Variables<\/h4>\n<p>In our previous example, count was defined outside the <strong>func<\/strong> and hence it was in global scope, now we will define count in the <strong>local scope<\/strong> by defining it inside the func function and then you can observe that <strong>local variable<\/strong> and <strong>global variables<\/strong> have different<strong> scopes<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; count=2\r\n&gt;&gt;&gt; def func():\r\n  count = 10\r\n  count+=1\r\n  print(count)\r\n\r\n&gt;&gt;&gt;func()\r\n&gt;&gt;&gt;print(count)<\/pre>\n<p><strong>Output: <\/strong><\/p>\n<div class=\"code-output\">11<br \/>\n2<\/div>\n<h4>3. Nonlocal Variables<\/h4>\n<p>When there are <strong>nested functions<\/strong>, the inner function can use variable from the outer function using the <strong>nonlocal keyword<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; def func1():\r\n  achievements=9\r\n  def func2():\r\n    nonlocal achievements\r\n    achievements+=2\r\n    print(achievements)\r\n  func2()\r\n\r\n\r\n&gt;&gt;&gt; func1()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">11<\/div>\n<h3>Deleting Variables<\/h3>\n<p>If you use the <strong>del keyword<\/strong>, you can delete a variable in Python.<\/p>\n<p>Let\u2019s define a variable and delete it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt;wannabe=2\r\n&gt;&gt;&gt;del wannabe\r\n&gt;&gt;&gt;print(wannabe)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span>File &#8220;&lt;pyshell#63&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span>print(wannabe)<br \/>\nNameError: name &#8216;wannabe&#8217; is not defined<\/div>\n<p>After you delete it, you cannot access it. It gives you a <strong>NameError<\/strong> exception.<\/p>\n<h3>The + Operator<\/h3>\n<p>You can join or concatenate two or more variables with the <strong>concatenation<\/strong> operator.<\/p>\n<p>The <strong>+<\/strong> sign is the concatenation operator.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; name='Lucifer'\r\n&gt;&gt;&gt; lname='Satan'\r\n&gt;&gt;&gt; name+lname<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">&#8216;LuciferSatan&#8217;<\/div>\n<p>This operator performs <strong>addition<\/strong> on integers and on floats.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 7+7.5<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">14.5<\/div>\n<p>You cannot add an <strong>integer<\/strong> and a <strong>string<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 7+name<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span>File &#8220;&lt;pyshell#68&gt;&#8221;, line 1, in &lt;module&gt;<br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span>7+name<br \/>\nTypeError: unsupported operand type(s) for +: &#8216;int&#8217; and &#8216;str&#8217;<\/div>\n<h3>Summary<\/h3>\n<p>This was all about Python variables.<\/p>\n<p>Today, we learned about <strong>variables<\/strong> in Python and how to define, use and delete them. We learned about <strong>local<\/strong>, <strong>global<\/strong> and <strong>nonlocal<\/strong> <strong>variables<\/strong> and about <strong>naming<\/strong> and <strong>assigning<\/strong>.<\/p>\n<p>I hope that our Python variables article was helpful to you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s dive into the world of variables in Python! In this tutorial, we&#8217;ll explore how to name, use, and delete variables. But first, let&#8217;s start with the basics: what exactly are variables in Python?&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":74212,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[1076,1077,1078,1079,1080,1081,1082],"class_list":["post-74204","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-assigning-variables","tag-python-global-variables","tag-python-naming-variables","tag-python-variables","tag-the-operator","tag-variables-in-python","tag-what-are-variables"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Variables - Time to level up your coding skills - TechVidvan<\/title>\n<meta name=\"description\" content=\"Python variables - Learn what are variables, how to assign, name and delete variables. See how to declare local &amp; global variables in Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/python-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Variables - Time to level up your coding skills - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Python variables - Learn what are variables, how to assign, name and delete variables. See how to declare local &amp; global variables in Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/python-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-12T08:25:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-22T12:22:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan 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 Variables - Time to level up your coding skills - TechVidvan","description":"Python variables - Learn what are variables, how to assign, name and delete variables. See how to declare local & global variables in Python.","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:\/\/techvidvan.com\/tutorials\/python-variables\/","og_locale":"en_US","og_type":"article","og_title":"Python Variables - Time to level up your coding skills - TechVidvan","og_description":"Python variables - Learn what are variables, how to assign, name and delete variables. See how to declare local & global variables in Python.","og_url":"https:\/\/techvidvan.com\/tutorials\/python-variables\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2019-12-12T08:25:07+00:00","article_modified_time":"2024-08-22T12:22:45+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Python Variables &#8211; Time to level up your coding skills","datePublished":"2019-12-12T08:25:07+00:00","dateModified":"2024-08-22T12:22:45+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/"},"wordCount":1014,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg","keywords":["python assigning variables","python global variables","python naming variables","Python Variables","The operator","variables in python","what are variables"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/python-variables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/","url":"https:\/\/techvidvan.com\/tutorials\/python-variables\/","name":"Python Variables - Time to level up your coding skills - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg","datePublished":"2019-12-12T08:25:07+00:00","dateModified":"2024-08-22T12:22:45+00:00","description":"Python variables - Learn what are variables, how to assign, name and delete variables. See how to declare local & global variables in Python.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/python-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-variables.jpg","width":802,"height":420,"caption":"Variables in Python"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/python-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Python Variables &#8211; Time to level up your coding skills"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=74204"}],"version-history":[{"count":2,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74204\/revisions"}],"predecessor-version":[{"id":447669,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74204\/revisions\/447669"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/74212"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=74204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=74204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=74204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}