{"id":366,"date":"2020-10-08T07:02:08","date_gmt":"2020-10-08T07:02:08","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=366"},"modified":"2025-03-26T13:58:08","modified_gmt":"2025-03-26T13:58:08","slug":"python-map-list","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/python-basics\/python-map-list\/","title":{"rendered":"How to Transform List Elements with Python map() Function"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to use the Python <code>map()<\/code> function with lists.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-python-map-function'>Introduction to the Python map() function <a href=\"#introduction-to-the-python-map-function\" class=\"anchor\" id=\"introduction-to-the-python-map-function\" title=\"Anchor for Introduction to the Python map() function\">#<\/a><\/h2>\n\n\n\n<p>When working with a <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-list\/\">list<\/a> (or a <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-tuples\/\">tuple<\/a>), you often need to transform the elements of the list and return a new list that contains the transformed element.<\/p>\n\n\n\n<p>Suppose, you want to double every number in the following <code>bonuses<\/code> list:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">bonuses = &#91;<span class=\"hljs-number\">100<\/span>, <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">300<\/span>]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To do it, you can use a <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-for-loop-list\/\">for loop<\/a> to iterate over the elements, double each of them, and add it to a new list like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">bonuses = &#91;<span class=\"hljs-number\">100<\/span>, <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">300<\/span>]\n\nnew_bonuses = &#91;]\n\n<span class=\"hljs-keyword\">for<\/span> bonus <span class=\"hljs-keyword\">in<\/span> bonuses:\n    new_bonuses.append(bonus*<span class=\"hljs-number\">2<\/span>)\n\nprint(new_bonuses)\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=Ym9udXNlcyA9IFsxMDAsIDIwMCwgMzAwXQoKbmV3X2JvbnVzZXMgPSBbXQoKZm9yIGJvbnVzIGluIGJvbnVzZXM6CiAgICBuZXdfYm9udXNlcy5hcHBlbmQoYm9udXMqMikKCnByaW50KG5ld19ib251c2VzKQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">&#91;<span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-number\">600<\/span>]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Python provides a nicer way to do this kind of task by using the <code>map()<\/code> built-in function.<\/p>\n\n\n\n<p>The <code>map()<\/code> function iterates over all elements in a list (or a tuple), applies a function to each, and returns a new iterator of the new elements.<\/p>\n\n\n\n<p>The following shows the basic syntax of the <code>map()<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">iterator = map(fn, list)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this syntax, <code>fn<\/code> is the name of the function that will call on each element of the list. <\/p>\n\n\n\n<p>In fact, you can pass any <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-iterables\/\">iterable<\/a> to the <code>map()<\/code> function, not just a list or tuple.<\/p>\n\n\n\n<p>Back to the previous example, to use the <code>map()<\/code> function, you define a function that doubles a bonus first and then use the map() function as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">double<\/span><span class=\"hljs-params\">(bonus)<\/span>:<\/span>\n    <span class=\"hljs-keyword\">return<\/span> bonus * <span class=\"hljs-number\">2<\/span>\n\n\nbonuses = &#91;<span class=\"hljs-number\">100<\/span>, <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">300<\/span>]\n\niterator = map(double, bonuses)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Or you make this code more concise by using a <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-lambda-expressions\/\">lambda expression<\/a> like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">bonuses = &#91;<span class=\"hljs-number\">100<\/span>, <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">300<\/span>]\niterator = map(<span class=\"hljs-keyword\">lambda<\/span> bonus: bonus*<span class=\"hljs-number\">2<\/span>, bonuses)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Once you have an iterator, you can iterate over the new elements using a <code>for<\/code> loop.<\/p>\n\n\n\n<p>Or you can convert an iterator to a list by using the the <code>list()<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">bonuses = &#91;<span class=\"hljs-number\">100<\/span>, <span class=\"hljs-number\">200<\/span>, <span class=\"hljs-number\">300<\/span>]\niterator = map(<span class=\"hljs-keyword\">lambda<\/span> bonus: bonus*<span class=\"hljs-number\">2<\/span>, bonuses)\nprint(list(iterator))<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='using-the-python-map-function-with-a-list-of-strings'>Using the Python map() function with a list of strings <a href=\"#using-the-python-map-function-with-a-list-of-strings\" class=\"anchor\" id=\"using-the-python-map-function-with-a-list-of-strings\" title=\"Anchor for Using the Python map() function with a list of strings\">#<\/a><\/h2>\n\n\n\n<p>The following example uses the <code>map()<\/code> function to return a new list where each element is transformed into the proper case:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">names = &#91;<span class=\"hljs-string\">'david'<\/span>, <span class=\"hljs-string\">'peter'<\/span>, <span class=\"hljs-string\">'jenifer'<\/span>]\nnew_names = map(<span class=\"hljs-keyword\">lambda<\/span> name: name.capitalize(), names)\nprint(list(new_names))\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=bmFtZXMgPSBbJ2RhdmlkJywgJ3BldGVyJywgJ2plbmlmZXInXQpuZXdfbmFtZXMgPSBtYXAobGFtYmRhIG5hbWU6IG5hbWUuY2FwaXRhbGl6ZSgpLCBuYW1lcykKcHJpbnQobGlzdChuZXdfbmFtZXMpKQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">&#91;<span class=\"hljs-string\">'David'<\/span>, <span class=\"hljs-string\">'Peter'<\/span>, <span class=\"hljs-string\">'Jenifer'<\/span>]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='using-the-python-map-function-with-a-list-of-tuples'>Using the Python map() function with a list of tuples <a href=\"#using-the-python-map-function-with-a-list-of-tuples\" class=\"anchor\" id=\"using-the-python-map-function-with-a-list-of-tuples\" title=\"Anchor for Using the Python map() function with a list of tuples\">#<\/a><\/h2>\n\n\n\n<p>Suppose that you have the following shopping cart represented as a list of tuples:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">carts = &#91;&#91;<span class=\"hljs-string\">'SmartPhone'<\/span>, <span class=\"hljs-number\">400<\/span>],\n         &#91;<span class=\"hljs-string\">'Tablet'<\/span>, <span class=\"hljs-number\">450<\/span>],\n         &#91;<span class=\"hljs-string\">'Laptop'<\/span>, <span class=\"hljs-number\">700<\/span>]]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>And you need to calculate the tax amount for each product with a 10% tax. In addition, you need to add the tax amount to the third element of each item in the list.<\/p>\n\n\n\n<p>The return list should be something like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">&#91;&#91;<span class=\"hljs-string\">'SmartPhone'<\/span>, <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-number\">40.0<\/span>],\n&#91;<span class=\"hljs-string\">'Tablet'<\/span>, <span class=\"hljs-number\">450<\/span>, <span class=\"hljs-number\">45.0<\/span>],\n&#91;<span class=\"hljs-string\">'Laptop'<\/span>, <span class=\"hljs-number\">700<\/span>, <span class=\"hljs-number\">70.0<\/span>]]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In order to do so, you can use the <code>map()<\/code> function to create a new element of the list and add the new tax amount to each like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">carts = &#91;&#91;<span class=\"hljs-string\">'SmartPhone'<\/span>, <span class=\"hljs-number\">400<\/span>],\n         &#91;<span class=\"hljs-string\">'Tablet'<\/span>, <span class=\"hljs-number\">450<\/span>],\n         &#91;<span class=\"hljs-string\">'Laptop'<\/span>, <span class=\"hljs-number\">700<\/span>]]\n\nTAX = <span class=\"hljs-number\">0.1<\/span>\ncarts = map(<span class=\"hljs-keyword\">lambda<\/span> item: &#91;item&#91;<span class=\"hljs-number\">0<\/span>], item&#91;<span class=\"hljs-number\">1<\/span>], item&#91;<span class=\"hljs-number\">1<\/span>] * TAX], carts)\n\nprint(list(carts))<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=Y2FydHMgPSBbWydTbWFydFBob25lJywgNDAwXSwKICAgICAgICAgWydUYWJsZXQnLCA0NTBdLAogICAgICAgICBbJ0xhcHRvcCcsIDcwMF1dCgpUQVggPSAwLjEKY2FydHMgPSBtYXAobGFtYmRhIGl0ZW06IFtpdGVtWzBdLCBpdGVtWzFdLCBpdGVtWzFdICogVEFYXSwgY2FydHMpCgpwcmludChsaXN0KGNhcnRzKSk%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json\">&#91;&#91;'SmartPhone', <span class=\"hljs-number\">400<\/span>, <span class=\"hljs-number\">40.0<\/span>], &#91;'Tablet', <span class=\"hljs-number\">450<\/span>, <span class=\"hljs-number\">45.0<\/span>], &#91;'Laptop', <span class=\"hljs-number\">700<\/span>, <span class=\"hljs-number\">70.0<\/span>]]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the Python <code>map()<\/code> function to call a function on every item of a list and returns an iterator.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id='quiz'>Quiz <a href=\"#quiz\" class=\"anchor\" id=\"quiz\" title=\"Anchor for Quiz\">#<\/a><\/h2>\n\n\n\n<iframe loading=\"lazy\"\n  name=\"quiz\"\n  src=\"\/quiz\/?quiz=list-map\"\n  height=\"700\"\n  width=\"600\"\n  class=\"iframe\"\n><\/iframe>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"366\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-map-list\/\"\n\t\t\t\tdata-post-title=\"How to Transform List Elements with Python map() Function\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"366\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-map-list\/\"\n\t\t\t\tdata-post-title=\"How to Transform List Elements with Python map() Function\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, you&#8217;ll learn how to use the Python map() function with lists. Introduction to the Python map() function # When working with a list (or a tuple), you often need to transform the elements of the list and return a new list that contains the transformed element. Suppose, you want to double [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":37,"menu_order":34,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-366","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/comments?post=366"}],"version-history":[{"count":2,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/366\/revisions"}],"predecessor-version":[{"id":7025,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/366\/revisions\/7025"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/37"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}