{"id":74731,"date":"2020-01-06T12:19:08","date_gmt":"2020-01-06T06:49:08","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=74731"},"modified":"2020-01-06T12:19:08","modified_gmt":"2020-01-06T06:49:08","slug":"python-tuples","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/","title":{"rendered":"Python Tuples &#8211; The immutable sequence of objects"},"content":{"rendered":"<p>In this Python tuples tutorial, we are going to look at a data structure that is Tuples.<\/p>\n<p>First, we will see what tuples are, then we will discuss how to <strong>create<\/strong>, <strong>access<\/strong>, <strong>slice<\/strong> and <strong>delete<\/strong> elements in the tuple. Furthermore, we will see the functions and operations performed on tuples.<\/p>\n<h3>What are Tuples in Python?<\/h3>\n<p>Tuples are <strong>collections<\/strong> of Python <strong>objects<\/strong>. They are similar to lists but the difference between them is that <strong>tuples<\/strong> are <strong>immutable<\/strong> while <strong>lists<\/strong> are <strong>mutable<\/strong>.<\/p>\n<h3>How to Create Tuples in Python?<\/h3>\n<p>Tuples are created by typing a <strong>sequence of items<\/strong>, separated by <strong>commas<\/strong>. Optionally, you can put the <strong>comma-separated<\/strong> values in <strong>parenthesis<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Tuple1 = (1,2,5,6)\nTuple2 = (\u2018a\u2019, \u201cb\u201d, \u2018c\u2019, \u201cd\u201d)\nTuple3 = () #empty tuple\nTuple4 = 5,3,1\nTuple5 = (\u201cLondon\u201d, \u201cTokyo\u201d, \u201cKorea\u201d, 1986,1640, 1948)<\/pre>\n<p><strong>Note:<\/strong> To create a single item tuple, you have to use a comma after the value.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Tup1 = (5)\nTup2 = (5,)\nprint(type(Tup1))\nprint(type(Tup2))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">&lt;class &#8216;int&#8217;&gt;<br \/>\n&lt;class &#8216;tuple&#8217;&gt;<\/div>\n<h3>Accessing Tuple<\/h3>\n<p>The values of tuples are stored at different <strong>index positions<\/strong> starting from <strong>zero<\/strong>. We can access the values by using their index positions inside <strong>square brackets<\/strong>.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cars = (\u201cFerrari\u201d, \u201cBMW\u201d, \u201cAudi\u201d, \u201cJaguar\u201d)\nprint(cars)\nprint(cars[0])\nprint(cars[1])\nprint(cars[3])\nprint(cars[3])\nprint(cars[4])<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(\u201cFerrari\u201d, \u201cBMW\u201d, \u201cAudi\u201d, \u201cJaguar\u201d)<br \/>\nFerrari<br \/>\nBMW<br \/>\nAudi<br \/>\nJaguar<br \/>\nTraceback (most recent call last):<br \/>\n<span style=\"font-weight: 400\">\u00a0\u00a0<\/span>File &#8220;&lt;stdin&gt;&#8221;, line 7, in &lt;module&gt;<br \/>\nIndexError: tuple index out of range<\/div>\n<p>We got the <strong>index error<\/strong> in line number 7 because index 4 is <strong>out of the range<\/strong>.<\/p>\n<h3>Iterating over Tuples<\/h3>\n<p>We can use <strong>for loops <\/strong>to <strong>iterate<\/strong> on a tuple. The <strong>for loop<\/strong>\u00a0will keep on iterating until the <strong>elements<\/strong> in the tuples are <strong>exhausted<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">for num in (12,4,6,22,8,10):\n    print(num)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">12<br \/>\n4<br \/>\n6<br \/>\n22<br \/>\n8<br \/>\n10<\/div>\n<h3>Slicing Tuples<\/h3>\n<p>To take out some parts from the tuple, we use the<strong> slicing operator([])<\/strong> and it <strong>returns<\/strong> a <strong>new tuple<\/strong>.<\/p>\n<h4>1. Positive Indexing<\/h4>\n<p>In positive indexing, we traverse the <strong>list<\/strong> from <strong>left to right<\/strong>. As we know, the index starts from <strong>zero<\/strong> and goes till the <strong>number of elements<\/strong> <strong>minus one<\/strong>.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">numbers = (1,2,3,4,5,6)\n\n#From zero to 4th element\nprint( numbers[:4] )\n#From 2nd to 3rd element\nprint( numbers[1:3] )\n#From 5th to 5th element\nprint( numbers[4:5] )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(1,2,3,4)<br \/>\n(2,3)<br \/>\n(5,)<\/div>\n<h4>2. Negative Indexing<\/h4>\n<p>In negative indexing, we <strong>traverse<\/strong> from <strong>right to left<\/strong>. The<strong> last number<\/strong> is accessed with <strong>-1<\/strong>, the<strong> second number<\/strong> with<strong> -2<\/strong> and so on.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">numbers = (1,2,3,4,5,6)\n\nprint( numbers[-3:] )\nprint( numbers[:-3] )\nprint( numbers[2:-2] )\nprint( numbers[-6:-2] )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(4,5,6)<br \/>\n(1,2,3)<br \/>\n(3,4)<br \/>\n(1,2,3,4)<\/div>\n<h3>Tuples Unpacking<\/h3>\n<p>With a special syntax, Python can unpack the values of a tuple and <strong>extract<\/strong> them into <strong>single variables<\/strong>.<\/p>\n<p>Let\u2019s see this with an example,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">a,b,c = (1,2,3)\nprint(a)\nprint(b)\nprint(c)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">1<br \/>\n2<br \/>\n3<\/div>\n<p>The number of variables to the left and right side should be the <strong>same<\/strong> and it assigns each variable respectively.<\/p>\n<h3>Changing Tuple Values<\/h3>\n<p>As we said earlier that tuples are <strong>immutable<\/strong> which means that once a tuple is created we <strong>cannot change<\/strong> its <strong>value<\/strong>.<\/p>\n<p>Let\u2019s try changing a tuple value and see what <strong>error<\/strong> we get.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">num = (1,2,3)\nnum[1] = 20<\/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;stdin&gt;&#8221;, line 2, in &lt;module&gt;<br \/>\nTypeError: &#8216;tuple&#8217; object does not support item assignment<\/div>\n<p>Let\u2019s see a special case when a tuple is containing list inside it.<\/p>\n<p>Lists are <strong>mutable<\/strong> so we can <strong>change<\/strong> the list <strong>value<\/strong> inside the tuples.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">tup = (\u2018a\u2019, \u2019b\u2019, [1, 2, 3], \u2019c\u2019, \u2019d\u2019)\ntup[2][1] = 10\nprint(tup)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(\u2018a\u2019, \u2019b\u2019, [1, 10, 3], \u2019c\u2019, \u2019d\u2019)<\/div>\n<h3>Deleting Python Tuples<\/h3>\n<p>Tuples are immutable objects so we cannot <strong>change<\/strong> or <strong>modify<\/strong> tuples.<\/p>\n<p>So, what about deleting an element from the tuple?<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">tup = (1,2,3,4,5)\ndel tup[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;stdin&gt;&#8221;, line 2, in &lt;module&gt;<br \/>\nTypeError: &#8216;tuple&#8217; object doesn&#8217;t support item deletion<\/div>\n<p>Hence now we conclude that we <strong>cannot delete<\/strong> an <strong>element<\/strong> from the tuple.<\/p>\n<p>But we can <strong>delete the whole tuple<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">del tup\nprint(tup)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Traceback (most recent call last):<br \/>\n<b>\u00a0\u00a0<\/b>File &#8220;&lt;stdin&gt;&#8221;, line 2, in &lt;module&gt;<br \/>\nNameError: name &#8216;tup&#8217; is not defined<\/div>\n<h3>Python Tuple Operations<\/h3>\n<p>Let\u2019s see the operations we can perform on tuples.<\/p>\n<p>Tuples can be <strong>concatenated<\/strong> and <strong>repeated,<\/strong> they <strong>return<\/strong> a <strong>new<\/strong> <strong>tuple<\/strong> after <strong>operations<\/strong>.<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-tuple-operations.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75017 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-tuple-operations.jpg\" alt=\"python tuple operations\" width=\"579\" height=\"304\" \/><\/a><\/p>\n<h3>Python Tuple Methods<\/h3>\n<p>Since tuples are immutable, we don\u2019t have methods to <strong>add<\/strong> or <strong>remove<\/strong> items. Instead, we have two available methods, <strong>count()<\/strong> and<strong> index()<\/strong>.<\/p>\n<h4>1. count()<\/h4>\n<p>This method is used to count the <strong>number of occurrences<\/strong> of a Python object in the tuple. It returns an <strong>integer value<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">(1,2,2,2,1,4,2).count(2)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">4<\/div>\n<h4>2. index()<\/h4>\n<p>This method returns the index of the <strong>specified<\/strong> item. In the case of <strong>multiple occurrences<\/strong>, it returns the <strong>first position<\/strong> of the object.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">(1, 3, 5, 7, 9, 7).index(7)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">3<\/div>\n<h3>Python Tuple Functions<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-tuple-functions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75018 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/python-tuple-functions.jpg\" alt=\"python tuple functions\" width=\"614\" height=\"368\" \/><\/a><\/h3>\n<h4>1. len()<\/h4>\n<p>The len() function returns us the <strong>length<\/strong> of a <strong>sequence<\/strong> or a <strong>container<\/strong>. It is applicable on <strong>tuples<\/strong> also.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">len((1,2,3,4,5))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">5<\/div>\n<h4>2. max()<\/h4>\n<p>The max() function returns us the <strong>maximum element<\/strong> from a <strong>sequence<\/strong> or <strong>container<\/strong>. The elements must contain <strong>all numbers<\/strong> or <strong>all<\/strong> <strong>characters<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">max((120,20,240))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">240<\/div>\n<h4>3. min()<\/h4>\n<p>The min() function returns the <strong>minimum value<\/strong> from group of <strong>elements<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">min((-10,-5, 3,20))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">-10<\/div>\n<h4>4. sum()<\/h4>\n<p>The sum() function calculates the <strong>total sum<\/strong> of all elements and returns it. It can only be used on <strong>numeric values<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sum((5,10,15,20))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">50<\/div>\n<h4>5. tuple()<\/h4>\n<p>The tuple() function <strong>converts<\/strong> an <strong>iterable<\/strong> like a <strong>list<\/strong>, <strong>set<\/strong>, <strong>string<\/strong> into an <strong>immutable<\/strong> <strong>tuple<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">tuple([1,2,3,4])<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(1,2,3,4)<\/div>\n<h4>6. sorted()<\/h4>\n<p>The sorted() function sorts the elements in ascending order. It takes an iterable like a tuple and returns a <strong>list<\/strong> of <strong>sorted elements<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sorted((4,3,2,1))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[1,2,3,4]<\/div>\n<p>That\u2019s all about the Python tuples.<\/p>\n<h3>Summary<\/h3>\n<p>In this TechVidvan&#8217;s Python tuples article, we studied the tuple data structure in Python. We learned how to <strong>create tuples<\/strong> and <strong>indexing<\/strong> of <strong>tuples<\/strong>. Tuples are <strong>immutable<\/strong> so we use them when we don\u2019t want to change the <strong>values<\/strong> of an object.<\/p>\n<p>Later on, we saw how to <strong>access<\/strong> elements of tuples and all the <strong>functions<\/strong> and <strong>operations<\/strong> that we can use on tuples.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Python tuples tutorial, we are going to look at a data structure that is Tuples. First, we will see what tuples are, then we will discuss how to create, access, slice and&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":75019,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[1182,1183,1184,1185,1186,1187],"class_list":["post-74731","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-tuple-functions","tag-python-tuple-methods","tag-python-tuple-operations","tag-python-tuples","tag-tuples-in-python","tag-what-are-tuples-in-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Tuples - The immutable sequence of objects - TechVidvan<\/title>\n<meta name=\"description\" content=\"Python Tuples - Learn tuples in Python, how to create, access, slice, &amp; delete elements in tuple. Also, see its operations, methods &amp; functions.\" \/>\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-tuples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Tuples - The immutable sequence of objects - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Python Tuples - Learn tuples in Python, how to create, access, slice, &amp; delete elements in tuple. Also, see its operations, methods &amp; functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/python-tuples\/\" \/>\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=\"2020-01-06T06:49:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.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 Tuples - The immutable sequence of objects - TechVidvan","description":"Python Tuples - Learn tuples in Python, how to create, access, slice, & delete elements in tuple. Also, see its operations, methods & functions.","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-tuples\/","og_locale":"en_US","og_type":"article","og_title":"Python Tuples - The immutable sequence of objects - TechVidvan","og_description":"Python Tuples - Learn tuples in Python, how to create, access, slice, & delete elements in tuple. Also, see its operations, methods & functions.","og_url":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-01-06T06:49:08+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.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-tuples\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Python Tuples &#8211; The immutable sequence of objects","datePublished":"2020-01-06T06:49:08+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/"},"wordCount":855,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.jpg","keywords":["python tuple functions","python tuple methods","python tuple operations","python tuples","Tuples in python","what are tuples in python"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/python-tuples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/","url":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/","name":"Python Tuples - The immutable sequence of objects - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.jpg","datePublished":"2020-01-06T06:49:08+00:00","description":"Python Tuples - Learn tuples in Python, how to create, access, slice, & delete elements in tuple. Also, see its operations, methods & functions.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/python-tuples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-tuples.jpg","width":802,"height":420,"caption":"tuples in python"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/python-tuples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Python Tuples &#8211; The immutable sequence of objects"}]},{"@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\/74731","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=74731"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74731\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/75019"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=74731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=74731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=74731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}