{"id":619,"date":"2018-04-18T05:20:37","date_gmt":"2018-04-18T05:20:37","guid":{"rendered":"http:\/\/www.afternerd.com\/blog\/?p=619"},"modified":"2020-04-12T17:04:47","modified_gmt":"2020-04-12T17:04:47","slug":"difference-between-list-tuple","status":"publish","type":"post","link":"https:\/\/www.afternerd.com\/blog\/difference-between-list-tuple\/","title":{"rendered":"Python: What is the Difference between a List and a Tuple?"},"content":{"rendered":"<p>So you just learned about <a href=\"https:\/\/www.afternerd.com\/blog\/python-lists-for-absolute-beginners\/\" target=\"_blank\" rel=\"noopener noreferrer\">lists<\/a> and <a href=\"https:\/\/www.tutorialspoint.com\/python\/python_tuples.htm\" target=\"_blank\" rel=\"noopener noreferrer\">tuples<\/a> and you&#8217;re wondering how they differ?<\/p>\n<p>This is a surprisingly common question.<\/p>\n<p>They both behave in a very similar way.<\/p>\n<p>Both lists and tuples are sequence data types that can store a collection of items.<\/p>\n<p>Each item stored in a list or a tuple can be of any data type.<\/p>\n<p>And you can also access any item by its index.<\/p>\n<p>So the question is, are they different at all?<\/p>\n<p>And if not, why do we have two data types that behave pretty much in the same way?<\/p>\n<p>Can&#8217;t we just live with either lists or tuples?<\/p>\n<p>Well, let&#8217;s try to find the answer.<\/p>\n<h2>The Key Difference between a List and a Tuple<\/h2>\n<p>The main difference between lists and tuples is the fact that lists are <strong>mutable<\/strong> whereas tuples are <strong>immutable<\/strong>.<\/p>\n<p>What does that even mean, you say?<\/p>\n<p>A mutable data type means that a python object of this type can be modified.<\/p>\n<p>An immutable object can&#8217;t.<\/p>\n<p>Let&#8217;s see what this means in action.<\/p>\n<p>Let&#8217;s create a list and assign it to a variable.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = [\"apples\", \"bananas\", \"oranges\"]<\/code><\/pre>\n<p>Now let&#8217;s see what happens when we try to modify the first item of the list.<\/p>\n<p>Let&#8217;s change <span class=\"symbol\">&#8220;apples&#8221;<\/span> to <span class=\"symbol\">&#8220;berries&#8221;<\/span>.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a[0] = \"berries\"\r\n&gt;&gt;&gt; a\r\n['berries', 'bananas', 'oranges']<\/code><\/pre>\n<p>Perfect! the first item of <span class=\"symbol\">a<\/span> has changed.<\/p>\n<p>Now, what if we want to try the same thing with a tuple instead of a list? Let&#8217;s see.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = (\"apples\", \"bananas\", \"oranges\")\r\n&gt;&gt;&gt; a[0] = \"berries\"\r\nTraceback (most recent call last):\r\n  File \"\", line 1, in \r\nTypeError: 'tuple' object does not support item assignment<\/code><\/pre>\n<p>We get an error saying that a tuple object doesn&#8217;t support item assignment.<\/p>\n<p>The reason we get this error is because tuple objects, unlike lists, are immutable which means you can&#8217;t modify a tuple object after it&#8217;s created.<\/p>\n<p>But you might be thinking, Karim, my man, I know you say you can&#8217;t do assignments the way you wrote it but how about this, doesn&#8217;t the following code modify <span class=\"symbol\">a<\/span>?<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = (\"apples\", \"bananas\", \"oranges\")\r\n&gt;&gt;&gt; a = (\"berries\", \"bananas\", \"oranges\")\r\n&gt;&gt;&gt; a\r\n('berries', 'bananas', 'oranges')<\/code><\/pre>\n<p>Fair question!<\/p>\n<p>Let&#8217;s see, are we actually modifying the first item in tuple <span class=\"symbol\">a<\/span> with the code above?<\/p>\n<p>The answer is <strong>No<\/strong>, absolutely not.<\/p>\n<p>To understand why, you first have to understand the difference between a variable and a python object.<\/p>\n<h2>The Difference Between a Variable and an Object<\/h2>\n<p>You are probably confusing variables with objects. This is a very common misconception among beginners.<\/p>\n<p>Remember that a variable is nothing but a reference to the actual python object in memory.<\/p>\n<p>The variable itself is not the object.<\/p>\n<p>For example, let&#8217;s try to visualize what happens when you assign a list to a variable <span class=\"symbol\">a<\/span>.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = [\"apples\", \"bananas\", \"oranges\"]<\/code><\/pre>\n<p>When you do this, a python object of type list is created in the memory and the variable <span class=\"symbol\">a<\/span> refers to this object by <strong>holding its location in memory<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-688\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/variable-object-1.png\" alt=\"\" width=\"501\" height=\"241\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/variable-object-1.png 501w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/variable-object-1-300x144.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/variable-object-1-200x96.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/variable-object-1-400x192.png 400w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/p>\n<p>In fact, you can actually retrieve the location of the list object in memory by inspecting <span class=\"symbol\">a<\/span> using the <span class=\"symbol\">id()<\/span> function.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = [\"apples\", \"bananas\", \"oranges\"]\r\n&gt;&gt;&gt; id(a)\r\n4340729544<\/code><\/pre>\n<p>Now if you modify the first index of the list, and check the <span class=\"symbol\">id()<\/span> again, you will get the same exact value because <span class=\"symbol\">a<\/span> is still referring to the same object.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a[0] = \"berries\"\r\n&gt;&gt;&gt; id(a)\r\n4340729544<\/code><\/pre>\n<p>The following figure shows exactly what happened after the modification.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-689\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1.png\" alt=\"\" width=\"678\" height=\"291\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1.png 678w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1-300x129.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1-200x86.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1-400x172.png 400w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/list-modification-1-600x258.png 600w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/p>\n<p>Now, let&#8217;s see what happens if we perform the same thing on tuples.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = (\"apples\", \"bananas\", \"oranges\")\r\n&gt;&gt;&gt; id(a)\r\n4340765824\r\n&gt;&gt;&gt; a = (\"berries\", \"bananas\", \"oranges\")\r\n&gt;&gt;&gt; id(a)\r\n4340765464<\/code><\/pre>\n<p>As you can see, the two addresses are different.<\/p>\n<p>This means that after the second assignment, a is referring to an entirely new object.<\/p>\n<p>This figure shows exactly what happened.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-691\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2.png\" alt=\"\" width=\"661\" height=\"361\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2.png 661w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2-300x164.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2-200x109.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2-400x218.png 400w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/tuple-modification-2-600x328.png 600w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/p>\n<p>Moreover, if no other variables in your program is referring to the older tuple then python&#8217;s garbage collector will delete the older tuple from the memory completely.<\/p>\n<p>So there you have it, this concept of mutability is the key difference between lists and tuples.<\/p>\n<p>Mutability is not just a python concept, it is a <a href=\"http:\/\/rigaux.org\/language-study\/various\/mutability-and-sharing\/\" target=\"_blank\" rel=\"noopener noreferrer\">programming language concept that you will encounter in various programming languages<\/a>.<\/p>\n<p>But now maybe this whole discussion evokes another question in your head.<\/p>\n<p>Why do we have mutable and immutable objects?<\/p>\n<h2>Why Do we need Mutable and Immutable Objects?<\/h2>\n<p>Well actually, they both serve different purposes.<\/p>\n<p>Let&#8217;s discuss some of the aspects that differentiate between mutable and immutable objects\/<\/p>\n<h3>1. Appending Performance<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-678\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/performance.png\" alt=\"\" width=\"560\" height=\"315\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/performance.png 560w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/performance-300x169.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/performance-200x113.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/performance-400x225.png 400w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>Mutability is more efficient when you know you will be frequently modifying an object.<\/p>\n<p>For example, assume you have some <a href=\"https:\/\/www.programiz.com\/python-programming\/iterator\" target=\"_blank\" rel=\"noopener noreferrer\">iterable object<\/a> (say x), and you want to append each element of x to a list.<\/p>\n<p>Of course you can just do <span class=\"symbol\">L = list(x)<\/span> but under the hood this transforms into a loop that looks like this:<\/p>\n<pre class=\"prettyprint\"><code>L  = []\r\nfor item in x:\r\n    L.append(item)<\/code><\/pre>\n<p>This works alright. You keep modifying the list object in place until all the elements of <span class=\"symbol\">x<\/span> exist in the list <span class=\"symbol\">L<\/span>.<\/p>\n<p>But can you even imagine what would happen if we had used a tuple instead?<\/p>\n<pre class=\"prettyprint\"><code>T  = ()\r\nfor item in x:\r\n    T = T + (item,)<\/code><\/pre>\n<p>Can you visualize what is happening in the memory?<\/p>\n<p>Since tuples are immutable, you are basically copying the contents of the tuple <span class=\"symbol\">T<\/span> to a new tuple object at <strong>EACH<\/strong> iteration.<\/p>\n<p>If the for loop is big, this is a huge performance problem.<\/p>\n<p>Actually, let&#8217;s use python to measure the performance of appending to a list vs appending to a tuple when x = range(10000).<\/p>\n<p><a href=\"https:\/\/www.afternerd.com\/blog\/timeit-multiple-lines\/\" target=\"_blank\" rel=\"noopener noreferrer\">This article<\/a> teaches you how to <a href=\"https:\/\/www.afternerd.com\/blog\/timeit-multiple-lines\/\" target=\"_blank\" rel=\"noopener noreferrer\">use the timeit module to measure the execution time of multiple lines of python<\/a>.<\/p>\n<pre class=\"prettyprint\"><code>$ python3 -m timeit \\\r\n-s \"L = []\" \\\r\n-s \"x = range(10000)\" \\\r\n\"for item in x:\" \"    L.append(item)\"\r\n1000 loops, best of 3: 1.08 msec per loop<\/code><\/pre>\n<p>Cool, 1.08 <strong>milliseconds<\/strong>.<\/p>\n<p>How about if we do the same thing with tuples?<\/p>\n<pre class=\"prettyprint\"><code>$ python3 -m timeit \\\r\n-s \"T = ()\" -s \"x = range(10000)\" \\\r\n\"for item in x:\" \"    T = T + (item,)\"\r\n10 loops, best of 3: 1.63 sec per loop<\/code><\/pre>\n<p>A whopping <strong>1.63 seconds<\/strong>!<\/p>\n<p>This is a huge performance difference between lists and tuples.<\/p>\n<p>If you want to test your patience, try <span class=\"symbol\">x = range(1000000).<\/span><\/p>\n<p>Now when someone tells you multiple appending to a <strong>string<\/strong> object is inefficient, you will understand exactly why (string objects are immutable too in python).<\/p>\n<blockquote><p>Appending performance: <strong>Mutability Wins!<\/strong><\/p><\/blockquote>\n<h3>2. Easiness of Debugging<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-680\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/debuggin.png\" alt=\"\" width=\"560\" height=\"315\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/debuggin.png 560w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/debuggin-300x169.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/debuggin-200x113.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/debuggin-400x225.png 400w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>Mutability is cool and all but one thing that can be really annoying with mutable objects is debugging.<\/p>\n<p>What do I mean by that?<\/p>\n<p>Let&#8217;s take a look at this very simple example.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = [1, 3, 5, 7]\r\n&gt;&gt;&gt; b = a\r\n&gt;&gt;&gt; b[0] = -10\r\n&gt;&gt;&gt; a\r\n[-10, 3, 5, 7]<\/code><\/pre>\n<p>Notice that when we do <span class=\"symbol\">b = a<\/span>, we are not <a href=\"https:\/\/www.afternerd.com\/blog\/python-copy-list\/\" target=\"_blank\" rel=\"noopener noreferrer\">copying the list<\/a> object from <span class=\"symbol\">b<\/span> to <span class=\"symbol\">a<\/span>.<\/p>\n<p>We are actually telling python that the two variables <span class=\"symbol\">a<\/span> and <span class=\"symbol\">b<\/span> should reference the same list object.<\/p>\n<p>Because <span class=\"symbol\">a<\/span> effectively holds the location of the Python object in memory, when you say <span class=\"symbol\">b = a<\/span> you copy that address location (not the actual object) to <span class=\"symbol\">b<\/span>.<\/p>\n<p>This results in having two references (a and b) to the same list object.<\/p>\n<p>In other words when we do <span class=\"symbol\">b[0] = -10<\/span>, it has the same effect as <span class=\"symbol\">a[0] = -10<\/span>.<\/p>\n<p>Of course you can look at the code and rightfully think that it is easy to debug.<\/p>\n<p>Well, you are right for small snippets of code like this, but imagine if you have a big project with many references to the same mutable object.<\/p>\n<p>It will be very challenging to track all the changes to this object because any modification by any of those references will modify the object.<\/p>\n<p>This is not the case with immutable objects even if you have multiple references to them.<\/p>\n<p>Once an immutable object is created, its content will never change.<\/p>\n<blockquote><p>Easiness of debugging: <strong>Immutability Wins!<\/strong><\/p><\/blockquote>\n<h3>3. Memory Efficiency<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-682\" src=\"http:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/memory.png\" alt=\"\" width=\"560\" height=\"315\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/memory.png 560w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/memory-300x169.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/memory-200x113.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2018\/04\/memory-400x225.png 400w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>Another benefit of immutability is that it allows the implementation of the language to be more memory efficient.<\/p>\n<p>Let me explain what I mean by that.<\/p>\n<p>In <a href=\"https:\/\/github.com\/python\/cpython\" target=\"_blank\" rel=\"noopener noreferrer\">CPython<\/a>\u00a0(the most popular implementation of Python) if you create immutable objects that hold the same value, python (under certain conditions) might bundle these different objects into one.<\/p>\n<p>For example, take a look at this code:<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = \"Karim\"\r\n&gt;&gt;&gt; b = \"Karim\"\r\n&gt;&gt;&gt; id(a)\r\n4364823608\r\n&gt;&gt;&gt; id(b)\r\n4364823608<\/code><\/pre>\n<p>Remember that Strings (as well as Integers, Floats, and Bools) are all examples of immutable objects as well.<\/p>\n<p>As you can see, even though in our python program we explicitly created two different string objects, python internally bundled them into one.<\/p>\n<p>How did we know that?<\/p>\n<p>Well because the identity of <span class=\"symbol\">a<\/span> is exactly the same as the identity of <span class=\"symbol\">b<\/span>.<\/p>\n<p>Python was able to do that because the immutability of strings makes it safe to perform this bundling.<\/p>\n<p>Not only that this will save us some memory (by not storing the string multiple times in memory), but also every time you want to create a new object with the same value, python will just create a reference to the object that already exists in memory which is definitely more efficient.<\/p>\n<p>This concept is called <a href=\"https:\/\/en.wikipedia.org\/wiki\/String_interning\" target=\"_blank\" rel=\"noopener noreferrer\">String Interning<\/a>, and this is an <a href=\"http:\/\/guilload.com\/python-string-interning\/\" target=\"_blank\" rel=\"noopener noreferrer\">excellent article if you want to dive in deeper<\/a>.<\/p>\n<p>Not only strings. This also applies to integers (under certain conditions).<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = 1\r\n&gt;&gt;&gt; b = 1\r\n&gt;&gt;&gt; id(a)\r\n4305324416\r\n&gt;&gt;&gt; id(b)\r\n4305324416<\/code><\/pre>\n<p>That&#8217;s pretty cool, isn&#8217;t it?<\/p>\n<p>What about tuples though?<\/p>\n<p>CPython until python 3.6 has made the design decision not to automatically bundle two equivalent tuples into one.<\/p>\n<pre class=\"prettyprint\"><code>&gt;&gt;&gt; a = (1, 2)\r\n&gt;&gt;&gt; b = (1, 2)\r\n&gt;&gt;&gt; id(a)\r\n4364806856\r\n&gt;&gt;&gt; id(b)\r\n4364806920<\/code><\/pre>\n<p>As you can see, <span class=\"symbol\">a<\/span> has a different identity than <span class=\"symbol\">b<\/span>.<\/p>\n<p>This design decision makes sense because performing interning for tuples requires making sure that all the tuple items are themselves immutable.<\/p>\n<blockquote><p>Memory efficiency: <strong>Immutability Wins<\/strong><\/p><\/blockquote>\n<h2>Conclusion<\/h2>\n<p>To understand the difference between python lists and tuples, you must understand the concept of mutability\/immutability first.<\/p>\n<p>Lists are mutable objects which means you can modify a list object after it has been created.<\/p>\n<p>Tuples, on the other hand, are immutable objects which means you can&#8217;t modify a tuple object after it&#8217;s been created.<\/p>\n<p>Both Mutability and Immutability have their own advantages and disadvantages.<\/p>\n<h3>Learning Python?<\/h3>\n<p>Check out <a href=\"https:\/\/courses.afternerd.com\/\">the Courses section!<\/a><\/p>\n\n<h2>Featured Posts<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/learn-python\/\">The Python Learning Path (From Beginner to Mastery)<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/learn-computer-science\/\">Learn Computer Science (From Zero to Hero)<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/coding-interview\/\">Coding Interview Preparation Guide<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/stock-investing-for-beginners\/\">The Programmer&#8217;s Guide to Stock Market Investing<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/start-programming-blog\/\">How to Start Your Programming Blog?<\/a><\/li>\n<\/ul>\n<div class=\"after-post-box\">\n<h2>Are you Beginning your Programming Career?<\/h2>\n<h3>I provide my best content for beginners in the newsletter.<\/h3>\n<ul>\n<li>Python tips for beginners, intermediate, and advanced levels.<\/li>\n<li>CS Career tips and advice.<\/li>\n<li>Special discounts on my premium courses when they launch.<\/li>\n<\/ul>\n<p>And so much more&#8230;<\/p>\n<h3>Subscribe now. It&#8217;s Free.<\/h3>\n<p><script type=\"text\/javascript\" src=\"\/\/mautic.afternerd.com\/form\/generate.js?id=2\"><\/script><\/p>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":623,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[13],"yst_prominent_words":[429,441,343,359,225,321,332,353,440,360,361,229,354,236,158,253,443,335,348,334],"_links":{"self":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/619"}],"collection":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/comments?post=619"}],"version-history":[{"count":21,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":1761,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/619\/revisions\/1761"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/media\/623"}],"wp:attachment":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/media?parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/categories?post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/tags?post=619"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}