{"id":130,"date":"2019-05-22T09:59:58","date_gmt":"2019-05-22T09:59:58","guid":{"rendered":"http:\/\/askpython.com\/?p=130"},"modified":"2022-07-05T14:02:32","modified_gmt":"2022-07-05T14:02:32","slug":"python-keywords","status":"publish","type":"post","link":"https:\/\/www.askpython.com\/python\/python-keywords","title":{"rendered":"Python Keywords"},"content":{"rendered":"\n<p>Python keywords are reserved words. They are used by python interpreters to understand the program. Keywords define the structure of programs. We can&#8217;t use keywords to name program entities such as variables, classes, and functions.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How Many Keywords in Python?<\/h2>\n\n\n\n<p>Python has a lot of keywords. The number keeps on growing with the new features coming in python.<\/p>\n\n\n\n<p>Python 3.10.5 is the current stable version as of writing this tutorial. There are 35 keywords in Python 3.10.5 release.<\/p>\n\n\n\n<p>We can get the complete list of keywords using the python interpreter help utility.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n$ python3.10\n&gt;&gt;&gt; help()\nhelp&gt; keywords\n\nHere is a list of the Python keywords.  Enter any keyword to get more help.\n\nFalse               class               from                or\nNone                continue            global              pass\nTrue                def                 if                  raise\nand                 del                 import              return\nas                  elif                in                  try\nassert              else                is                  while\nasync               except              lambda              with\nawait               finally             nonlocal            yield\nbreak               for                 not \n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"857\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list-1024x857.png\" alt=\"Python Keywords List\" class=\"wp-image-131\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list-1024x857.png 1024w, https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list-300x251.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list-768x643.png 768w, https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list-1536x1286.png 1536w, https:\/\/www.askpython.com\/wp-content\/uploads\/2019\/05\/python-keywords-list.png 1548w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Python Keywords List<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Python Keywords List<\/h2>\n\n\n\n<p>We can use the &#8220;keyword&#8221; module to get the list of keywords.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n% python3\nPython 3.10.5 (v3.10.5:f377153967, Jun  6 2022, 12:36:10) &#x5B;Clang 13.0.0 (clang-1300.0.29.30)] on darwin\nType &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.\n&gt;&gt;&gt; import keyword\n&gt;&gt;&gt; keyword.kwlist\n&#x5B;&#039;False&#039;, &#039;None&#039;, &#039;True&#039;, &#039;and&#039;, &#039;as&#039;, &#039;assert&#039;, &#039;async&#039;, &#039;await&#039;, &#039;break&#039;, &#039;class&#039;, &#039;continue&#039;, &#039;def&#039;, &#039;del&#039;, &#039;elif&#039;, &#039;else&#039;, &#039;except&#039;, &#039;finally&#039;, &#039;for&#039;, &#039;from&#039;, &#039;global&#039;, &#039;if&#039;, &#039;import&#039;, &#039;in&#039;, &#039;is&#039;, &#039;lambda&#039;, &#039;nonlocal&#039;, &#039;not&#039;, &#039;or&#039;, &#039;pass&#039;, &#039;raise&#039;, &#039;return&#039;, &#039;try&#039;, &#039;while&#039;, &#039;with&#039;, &#039;yield&#039;]\n&gt;&gt;&gt; len(keyword.kwlist)\n35\n&gt;&gt;&gt; \n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"298\" src=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2022\/07\/python-keyword-module-kwlist-1024x298.png\" alt=\"Python Keyword Module Kwlist\" class=\"wp-image-32031\" srcset=\"https:\/\/www.askpython.com\/wp-content\/uploads\/2022\/07\/python-keyword-module-kwlist-1024x298.png 1024w, https:\/\/www.askpython.com\/wp-content\/uploads\/2022\/07\/python-keyword-module-kwlist-300x87.png 300w, https:\/\/www.askpython.com\/wp-content\/uploads\/2022\/07\/python-keyword-module-kwlist-768x223.png 768w, https:\/\/www.askpython.com\/wp-content\/uploads\/2022\/07\/python-keyword-module-kwlist.png 1376w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Python Soft Keywords<\/h2>\n\n\n\n<p>Python 3.9 introduced the concept of soft keywords. We can use soft keywords as variable names and they get special treatment only in the context of the program. As of now, there are two soft keywords &#8211; <strong>merge<\/strong> and <strong>case<\/strong>. We can confirm this using the keyword module.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&gt;&gt;&gt; keyword.softkwlist\n&#x5B;&#039;_&#039;, &#039;case&#039;, &#039;match&#039;]\n&gt;&gt;&gt; \n<\/pre><\/div>\n\n\n<p><strong>Why do we need soft keywords?<\/strong><\/p>\n\n\n\n<p>I think the idea of a soft keyword is introduced to avoid breaking the existing code in case they are used as an identifier. This will give enough time for developers to make appropriate changes to their code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Check if a String is a Keyword?<\/h2>\n\n\n\n<p>We can use <em>keyword.iskeyword()<\/em> function to check if a string is a reserved keyword. <\/p>\n\n\n\n<p>For example, is print a keyword in python?<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&gt;&gt;&gt; keyword.iskeyword(&#039;print&#039;)\nFalse\n&gt;&gt;&gt; \n<\/pre><\/div>\n\n\n<p>So, print is not a keyword in python.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Brief Introduction of the Python Keywords<\/h2>\n\n\n\n<p>We will cover all the python keywords in future tutorials. Let&#8217;s get the basic idea of the purpose and usage of these keywords.<\/p>\n\n\n\n<table class=\"tg\">\n<tbody><tr>\n<th class=\"tg-two\">Serial No<\/th>\n<th class=\"tg-two\">Keyword<\/th>\n<th class=\"tg-two\">Description<\/th>\n<th class=\"tg-two\">Example<\/th>\n<\/tr>\n<tr>\n<td class=\"tg-one\">1<\/td>\n<td class=\"tg-one\">False<\/td>\n<td class=\"tg-one\">instance of class bool.<\/td>\n<td class=\"tg-one\">x = False<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">2<\/td>\n<td class=\"tg-two\">class<\/td>\n<td class=\"tg-two\">keyword to define a class.<\/td>\n<td class=\"tg-two\">class Foo:\n    pass<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">3<\/td>\n<td class=\"tg-one\">from<\/td>\n<td class=\"tg-one\">clause to import class from module<\/td>\n<td class=\"tg-one\">from collections import OrderedDict<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">4<\/td>\n<td class=\"tg-two\">or<\/td>\n<td class=\"tg-two\">Boolean operator<\/td>\n<td class=\"tg-two\">x = True or False<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">5<\/td>\n<td class=\"tg-one\">None<\/td>\n<td class=\"tg-one\">instance of NoneType object<\/td>\n<td class=\"tg-one\">x = None<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">6<\/td>\n<td class=\"tg-two\">continue<\/td>\n<td class=\"tg-two\">continue statement, used in the nested for and while loop. It continues with the next cycle of the nearest enclosing loop.\n<\/td>\n<td class=\"tg-two\">numbers = range(1,11)\nfor number in numbers:\n    if number == 7:\n        continue\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">7<\/td>\n<td class=\"tg-one\">global<\/td>\n<td class=\"tg-one\">global statement allows us to modify the variables outside the current scope.<\/td>\n<td class=\"tg-one\">x = 0\ndef add():\n    global x\n    x = x + 10\n\t\nadd()\nprint(x) # 10\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">8<\/td>\n<td class=\"tg-two\">pass<\/td>\n<td class=\"tg-two\">Python pass statement is used to do nothing. It is useful when we require some statement but we don&#8217;t want to execute any code.<\/td>\n<td class=\"tg-two\">\ndef foo(): \n    pass\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">9<\/td>\n<td class=\"tg-one\">True<\/td>\n<td class=\"tg-one\">instance of bool class.<\/td>\n<td class=\"tg-one\">x = True<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">10<\/td>\n<td class=\"tg-two\">def<\/td>\n<td class=\"tg-two\">keyword used to define a function.<\/td>\n<td class=\"tg-two\">\ndef bar():\n    print(&#8220;Hello&#8221;)\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">11<\/td>\n<td class=\"tg-one\">if<\/td>\n<td class=\"tg-one\">if statement is used to write conditional code block.<\/td>\n<td class=\"tg-one\">\nx = 10\nif x%2 == 0:\n    print(&#8220;x is even&#8221;) # prints &#8220;x is even&#8221;\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">12<\/td>\n<td class=\"tg-two\">raise<\/td>\n<td class=\"tg-two\">The raise statement is used to throw exceptions in the program.<\/td>\n<td class=\"tg-two\">\ndef square(x):\n    if type(x) is not int:\n    raise TypeError(&#8220;Require int argument&#8221;)\n    print(x * x)\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">13<\/td>\n<td class=\"tg-one\">and<\/td>\n<td class=\"tg-one\">Boolean operator for and operation.<\/td>\n<td class=\"tg-one\">\nx = True\ny = False\n\nprint(x and y)  # False\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">14<\/td>\n<td class=\"tg-two\">del<\/td>\n<td class=\"tg-two\">The del keyword is used to delete objects such as variables, list, objects, etc.<\/td>\n<td class=\"tg-two\">\ns1 = &#8220;Hello&#8221;\nprint(s1)  # Hello\ndel s1\nprint(s1)  # NameError: name &#8216;s1&#8217; is not defined\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">15<\/td>\n<td class=\"tg-one\">import<\/td>\n<td class=\"tg-one\">The import statement is used to import modules and classes into our program.<\/td>\n<td class=\"tg-one\">\n# importing class from a module\nfrom collections import OrderedDict\n\n# import module\nimport math\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">16<\/td>\n<td class=\"tg-two\">return<\/td>\n<td class=\"tg-two\">The return statement is used in the function to return a value.<\/td>\n<td class=\"tg-two\">\ndef add(x,y):\n    return x+y\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">17<\/td>\n<td class=\"tg-one\">as<\/td>\n<td class=\"tg-one\">Python as keyword is used to provide name for import, except, and with statement.<\/td>\n<td class=\"tg-one\">\nfrom collections import OrderedDict as od\nimport math as m\n\nwith open(&#8216;data.csv&#8217;) as file:\n    pass\n    # do some processing on file\n\ntry:\n    pass\nexcept TypeError as e:\n    pass\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">18<\/td>\n<td class=\"tg-two\">elif<\/td>\n<td class=\"tg-two\">The elif statement is always used with if statement for &#8220;else if&#8221; operation.<\/td>\n<td class=\"tg-two\">\nx = 10\n\nif x &gt; 10:\n    print(&#8216;x is greater than 10&#8217;)\nelif x &gt; 100:\n    print(&#8216;x is greater than 100&#8217;)\nelif x == 10:\n    print(&#8216;x is equal to 10&#8217;)\nelse:\n    print(&#8216;x is less than 10&#8217;)<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">19<\/td>\n<td class=\"tg-one\">in<\/td>\n<td class=\"tg-one\">Python in keyword is used to test membership.<\/td>\n<td class=\"tg-one\">\nl1 = [1, 2, 3, 4, 5]\n\nif 2 in l1:\n    print(&#8216;list contains 2&#8217;)\n\ns = &#8216;abcd&#8217;\n\nif &#8216;a&#8217; in s:\n    print(&#8216;string contains a&#8217;)\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">20<\/td>\n<td class=\"tg-two\">try<\/td>\n<td class=\"tg-two\">Python try statement is used to write exception handling code.<\/td>\n<td class=\"tg-two\">\nx = &#8221;\ntry:\n    i = int(x)\nexcept ValueError as ae:\n    print(ae)\n\n# invalid literal for int() with base 10: &#8221;\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">21<\/td>\n<td class=\"tg-one\">assert<\/td>\n<td class=\"tg-one\">The assert statement allows us to insert debugging assertions in the program. If the assertion is True, the program continues to run. Otherwise AssertionError is thrown.<\/td>\n<td class=\"tg-one\">\ndef divide(a, b):\n    assert b != 0\n    return a \/ b\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">22<\/td>\n<td class=\"tg-two\">else<\/td>\n<td class=\"tg-two\">The else statement is used with if-elif conditions. It is used to execute statements when none of the earlier conditions are True.<\/td>\n<td class=\"tg-two\">\nif False:\n    pass\nelse:\n    print(&#8216;this will always print&#8217;)\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">23<\/td>\n<td class=\"tg-one\">is<\/td>\n<td class=\"tg-one\">Python is keyword is used to test if two variables refer to the same object. This is same as using == operator.<\/td>\n<td class=\"tg-one\">\nfruits = [&#8216;apple&#8217;]\nfruits1 = [&#8216;apple&#8217;]\nf = fruits\nprint(f is fruits)  # True\nprint(fruits1 is fruits)  # False\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">24<\/td>\n<td class=\"tg-two\">while<\/td>\n<td class=\"tg-two\">The while statement is used to run a block of statements till the expression is True.<\/td>\n<td class=\"tg-two\">\ni = 0\nwhile i &lt; 3:\n    print(i)\n    i+=1\n\n# Output\n# 0\n# 1\n# 2\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">25<\/td>\n<td class=\"tg-one\">async<\/td>\n<td class=\"tg-one\">New keyword introduced in Python 3.5. This keyword is always used in couroutine function body. It&#8217;s used with asyncio module and await keywords.<\/td>\n<td class=\"tg-one\">\nimport asyncio\nimport time\n\nasync def ping(url):\n    print(f&#8217;Ping Started for {url}&#8217;)\n    await asyncio.sleep(1)\n    print(f&#8217;Ping Finished for {url}&#8217;)\n\nasync def main():\n    await asyncio.gather(\n    ping(&#8216;askpython.com&#8217;),\n    ping(&#8216;python.org&#8217;),\n    )\n\nif __name__ == &#8216;__main__&#8217;:\n    then = time.time()\n    loop = asyncio.get_event_loop()\n    loop.run_until_complete(main())\n    now = time.time()\n    print(f&#8217;Execution Time = {now &#8211; then}&#8217;)\n\n# Output\nPing Started for askpython.com\nPing Started for python.org\nPing Finished for askpython.com\nPing Finished for python.org\nExecution Time = 1.004091739654541\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">26<\/td>\n<td class=\"tg-two\">await<\/td>\n<td class=\"tg-two\">New keyword in Python 3.5 for asynchronous processing.<\/td>\n<td class=\"tg-two\">Above example demonstrates the use of async and await keywords.<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">27<\/td>\n<td class=\"tg-one\">lambda<\/td>\n<td class=\"tg-one\">The lambda keyword is used to create lambda expressions.<\/td>\n<td class=\"tg-one\">\nmultiply = lambda a, b: a * b\nprint(multiply(8, 6))  # 48\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">28<\/td>\n<td class=\"tg-two\">with<\/td>\n<td class=\"tg-two\">Python with statement is used to wrap the execution of a block with\nmethods defined by a context manager. The object must implement __enter__() and __exit__() functions.<\/td>\n<td class=\"tg-two\">\nwith open(&#8216;data.csv&#8217;) as file:\n    file.read()<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">29<\/td>\n<td class=\"tg-one\">except<\/td>\n<td class=\"tg-one\">Python except keyword is used to catch the exceptions thrown in try block and process it.<\/td>\n<td class=\"tg-one\">Please check the try keyword example.<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">30<\/td>\n<td class=\"tg-two\">finally<\/td>\n<td class=\"tg-two\">The finally statement is used with try-except statements. The code in finally block is always executed. It&#8217;s mainly used to close resources.<\/td>\n<td class=\"tg-two\">\ndef division(x, y):\n    try:\n        return x \/ y\n    except ZeroDivisionError as e:\n        print(e)\n        return -1\n    finally:\n        print(&#8216;this will always execute&#8217;)\n\n\nprint(division(10, 2))\nprint(division(10, 0))\n\n# Output\nthis will always execute\n5.0\ndivision by zero\nthis will always execute\n-1\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">31<\/td>\n<td class=\"tg-one\">nonlocal<\/td>\n<td class=\"tg-one\">The nonlocal keyword is used to access the variables defined outside the scope of the block. This is always used in the nested functions to access variables defined outside.<\/td>\n<td class=\"tg-one\">\ndef outer():\n    v = &#8216;outer&#8217;\n\n    def inner():\n        nonlocal v\n        v = &#8216;inner&#8217;\n\n    inner()\n    print(v)\n\n\nouter()\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">32<\/td>\n<td class=\"tg-two\">yield<\/td>\n<td class=\"tg-two\">Python yield keyword is a replacement of return keyword. This is used to return values one by one from the function.<\/td>\n<td class=\"tg-two\">\ndef multiplyByTen(*kwargs):\n    for i in kwargs:\n        yield i * 10\n\na = multiplyByTen(4, 5,)  # a is generator object, an iterator\n\n# showing the values\nfor i in a:\n    print(i)\n\n# Output\n40\n50<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">33<\/td>\n<td class=\"tg-one\">break<\/td>\n<td class=\"tg-one\">The break statement is used with nested &#8220;for&#8221; and &#8220;while&#8221; loops. It stops the current loop execution and passes the control to the start of the loop.<\/td>\n<td class=\"tg-one\">\nnumber = 1\nwhile True:\n    print(number)\n    number += 2\n    if number &gt; 5:\n        break\n        print(number)  # never executed\n\n# Output\n1\n3\n5<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-two\">34<\/td>\n<td class=\"tg-two\">for<\/td>\n<td class=\"tg-two\">Python for keyword is used to iterate over the elements of a sequence or iterable object.<\/td>\n<td class=\"tg-two\">\ns1 = &#8216;Hello&#8217;\nfor c in s1:\n    print(c)\n\n# Output\nH\ne\nl\nl\no<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-one\">35<\/td>\n<td class=\"tg-one\">not<\/td>\n<td class=\"tg-one\">The not keyword is used for boolean not operation.<\/td>\n<td class=\"tg-one\">\nx = 20\nif x is not 10:\n    print(&#8216;x is not equal to 10&#8217;)\n\nx = True\nprint(not x)  # False\n<\/td>\n<\/tr>\n<\/tbody><\/table>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Python keywords have specific functions. They are used by the python interpreter to understand the code and execute them. There are 35 keywords in Python. The number will keep on growing with new features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What\u2019s next?<\/h2>\n\n\n\n<p>You got a brief idea of keywords in python. Now, you should go through the following tutorials to get the basics of Python programming.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.askpython.com\/python\/python-identifiers-rules-best-practices\">Python identifiers<\/a><\/li><li><a href=\"https:\/\/www.askpython.com\/python\/python-variables\">Python Variables<\/a><\/li><li><a href=\"https:\/\/www.askpython.com\/python\/python-data-types\">Python Data Types<\/a><\/li><li><a href=\"https:\/\/www.askpython.com\/python\/python-statements\">Python Statements<\/a><\/li><li><a href=\"https:\/\/www.askpython.com\/python\/python-functions\">Python Functions<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/docs.python.org\/3\/library\/keyword.html\" target=\"_blank\" rel=\"noreferrer noopener\">Python keyword module<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Python keywords are reserved words. They are used by python interpreters to understand the program. Keywords define the structure of programs. We can&#8217;t use keywords to name program entities such as variables, classes, and functions. How Many Keywords in Python? Python has a lot of keywords. The number keeps on growing with the new features [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-python"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":0,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}