{"id":764,"date":"2020-10-25T10:18:25","date_gmt":"2020-10-25T10:18:25","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=764"},"modified":"2025-03-30T12:18:58","modified_gmt":"2025-03-30T12:18:58","slug":"python-write-csv-file","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/python-basics\/python-write-csv-file\/","title":{"rendered":"Python Write CSV File"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to write data into a CSV file using the built-in <code>csv<\/code> module.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='steps-for-writing-a-csv-file'>Steps for writing a CSV file <a href=\"#steps-for-writing-a-csv-file\" class=\"anchor\" id=\"steps-for-writing-a-csv-file\" title=\"Anchor for Steps for writing a CSV file\">#<\/a><\/h2>\n\n\n\n<p>To write data into a CSV file, you follow these steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, open the CSV file for writing (<code>w<\/code> mode) by using the <code>open()<\/code> function.<\/li>\n\n\n\n<li>Second, create a CSV writer object by calling the <code>writer()<\/code> function of the <code>csv<\/code> module.<\/li>\n\n\n\n<li>Third, write data to CSV file by calling the <code>writerow()<\/code> or <code>writerows()<\/code> method of the CSV writer object.<\/li>\n\n\n\n<li>Finally, close the file once you complete writing data to it.<\/li>\n<\/ul>\n\n\n\n<p>The following code illustrates the above steps:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv\n\n<span class=\"hljs-comment\"># open the file in the write mode<\/span>\nf = open(<span class=\"hljs-string\">'path\/to\/csv_file'<\/span>, <span class=\"hljs-string\">'w'<\/span>)\n\n<span class=\"hljs-comment\"># create the csv writer<\/span>\nwriter = csv.writer(f)\n\n<span class=\"hljs-comment\"># write a row to the csv file<\/span>\nwriter.writerow(row)\n\n<span class=\"hljs-comment\"># close the file<\/span>\nf.close()<\/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>It&#8217;ll be shorter if you use the <code>with<\/code> statement so that you don&#8217;t need to call the <code>close()<\/code> method to explicitly close the file:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv\n\n<span class=\"hljs-comment\"># open the file in the write mode<\/span>\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'path\/to\/csv_file'<\/span>, <span class=\"hljs-string\">'w'<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    <span class=\"hljs-comment\"># create the csv writer<\/span>\n    writer = csv.writer(f)\n\n    <span class=\"hljs-comment\"># write a row to the csv file<\/span>\n    writer.writerow(row)<\/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>If you&#8217;re dealing with non-ASCII characters, you need to specify the character encoding in the <code>open()<\/code> function.<\/p>\n\n\n\n<p>The following illustrates how to write UTF-8 characters to a CSV file:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv\n\n<span class=\"hljs-comment\"># open the file in the write mode<\/span>\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'path\/to\/csv_file'<\/span>, <span class=\"hljs-string\">'w'<\/span>, encoding=<span class=\"hljs-string\">'UTF8'<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    <span class=\"hljs-comment\"># create the csv writer<\/span>\n    writer = csv.writer(f)\n\n    <span class=\"hljs-comment\"># write a row to the csv file<\/span>\n    writer.writerow(row)<\/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<h2 class=\"wp-block-heading\" id='writing-to-csv-files-example'>Writing to CSV files example <a href=\"#writing-to-csv-files-example\" class=\"anchor\" id=\"writing-to-csv-files-example\" title=\"Anchor for Writing to CSV files example\">#<\/a><\/h2>\n\n\n\n<p>The following example shows how to write data to the CSV file:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv  \n\nheader = &#91;<span class=\"hljs-string\">'name'<\/span>, <span class=\"hljs-string\">'area'<\/span>, <span class=\"hljs-string\">'country_code2'<\/span>, <span class=\"hljs-string\">'country_code3'<\/span>]\ndata = &#91;<span class=\"hljs-string\">'Afghanistan'<\/span>, <span class=\"hljs-number\">652090<\/span>, <span class=\"hljs-string\">'AF'<\/span>, <span class=\"hljs-string\">'AFG'<\/span>]\n\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'countries.csv'<\/span>, <span class=\"hljs-string\">'w'<\/span>, encoding=<span class=\"hljs-string\">'UTF8'<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    writer = csv.writer(f)\n\n    <span class=\"hljs-comment\"># write the header<\/span>\n    writer.writerow(header)\n\n    <span class=\"hljs-comment\"># write the data<\/span>\n    writer.writerow(data)<\/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>If you open the <code>countries.csv<\/code>, you&#8217;ll see one issue that the file contents have an additional blank line between two subsequent rows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"83\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-blank-line.png\" alt=\"\" class=\"wp-image-765\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-blank-line.png 443w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-blank-line-300x56.png 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/figure>\n\n\n\n<p>To remove the blank line, you pass the keyword argument <code>newline=''<\/code> to the <code>open()<\/code> 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-keyword\">import<\/span> csv\n\nheader = &#91;<span class=\"hljs-string\">'name'<\/span>, <span class=\"hljs-string\">'area'<\/span>, <span class=\"hljs-string\">'country_code2'<\/span>, <span class=\"hljs-string\">'country_code3'<\/span>]\ndata = &#91;<span class=\"hljs-string\">'Afghanistan'<\/span>, <span class=\"hljs-number\">652090<\/span>, <span class=\"hljs-string\">'AF'<\/span>, <span class=\"hljs-string\">'AFG'<\/span>]\n\n\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'countries.csv'<\/span>, <span class=\"hljs-string\">'w'<\/span>, encoding=<span class=\"hljs-string\">'UTF8'<\/span>, newline=<span class=\"hljs-string\">''<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    writer = csv.writer(f)\n\n    <span class=\"hljs-comment\"># write the header<\/span>\n    writer.writerow(header)\n\n    <span class=\"hljs-comment\"># write the data<\/span>\n    writer.writerow(data)<\/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>Output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"52\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-remove-blank-lines.png\" alt=\"\" class=\"wp-image-766\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-remove-blank-lines.png 442w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Write-CSV-remove-blank-lines-300x35.png 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id='writing-multiple-rows-to-csv-files'>Writing multiple rows to CSV files <a href=\"#writing-multiple-rows-to-csv-files\" class=\"anchor\" id=\"writing-multiple-rows-to-csv-files\" title=\"Anchor for Writing multiple rows to CSV files\">#<\/a><\/h2>\n\n\n\n<p>To write multiple rows to a CSV file at once, you use the <code>writerows()<\/code> method of the CSV writer object.<\/p>\n\n\n\n<p>The following uses the <code>writerows()<\/code> method to write multiple rows into the <code>countries.csv<\/code> file:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv\n\nheader = &#91;<span class=\"hljs-string\">'name'<\/span>, <span class=\"hljs-string\">'area'<\/span>, <span class=\"hljs-string\">'country_code2'<\/span>, <span class=\"hljs-string\">'country_code3'<\/span>]\ndata = &#91;\n    &#91;<span class=\"hljs-string\">'Albania'<\/span>, <span class=\"hljs-number\">28748<\/span>, <span class=\"hljs-string\">'AL'<\/span>, <span class=\"hljs-string\">'ALB'<\/span>],\n    &#91;<span class=\"hljs-string\">'Algeria'<\/span>, <span class=\"hljs-number\">2381741<\/span>, <span class=\"hljs-string\">'DZ'<\/span>, <span class=\"hljs-string\">'DZA'<\/span>],\n    &#91;<span class=\"hljs-string\">'American Samoa'<\/span>, <span class=\"hljs-number\">199<\/span>, <span class=\"hljs-string\">'AS'<\/span>, <span class=\"hljs-string\">'ASM'<\/span>],\n    &#91;<span class=\"hljs-string\">'Andorra'<\/span>, <span class=\"hljs-number\">468<\/span>, <span class=\"hljs-string\">'AD'<\/span>, <span class=\"hljs-string\">'AND'<\/span>],\n    &#91;<span class=\"hljs-string\">'Angola'<\/span>, <span class=\"hljs-number\">1246700<\/span>, <span class=\"hljs-string\">'AO'<\/span>, <span class=\"hljs-string\">'AGO'<\/span>]\n]\n\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'countries.csv'<\/span>, <span class=\"hljs-string\">'w'<\/span>, encoding=<span class=\"hljs-string\">'UTF8'<\/span>, newline=<span class=\"hljs-string\">''<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    writer = csv.writer(f)\n\n    <span class=\"hljs-comment\"># write the header<\/span>\n    writer.writerow(header)\n\n    <span class=\"hljs-comment\"># write multiple rows<\/span>\n    writer.writerows(data)<\/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<h2 class=\"wp-block-heading\" id='writing-to-csv-files-using-the-dictwriter-class'>Writing to CSV files using the DictWriter class <a href=\"#writing-to-csv-files-using-the-dictwriter-class\" class=\"anchor\" id=\"writing-to-csv-files-using-the-dictwriter-class\" title=\"Anchor for Writing to CSV files using the DictWriter class\">#<\/a><\/h2>\n\n\n\n<p>If each row of the CSV file is a dictionary, you can use the <code>DictWriter<\/code> class of the <code>csv<\/code> module to write the dictionary to the CSV file.<\/p>\n\n\n\n<p>The example illustrates how to use the DictWriter class to write data to a CSV file:<\/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\"><span class=\"hljs-keyword\">import<\/span> csv\n\n<span class=\"hljs-comment\"># csv header<\/span>\nfieldnames = &#91;<span class=\"hljs-string\">'name'<\/span>, <span class=\"hljs-string\">'area'<\/span>, <span class=\"hljs-string\">'country_code2'<\/span>, <span class=\"hljs-string\">'country_code3'<\/span>]\n\n<span class=\"hljs-comment\"># csv data<\/span>\nrows = &#91;\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'Albania'<\/span>,\n    <span class=\"hljs-string\">'area'<\/span>: <span class=\"hljs-number\">28748<\/span>,\n    <span class=\"hljs-string\">'country_code2'<\/span>: <span class=\"hljs-string\">'AL'<\/span>,\n    <span class=\"hljs-string\">'country_code3'<\/span>: <span class=\"hljs-string\">'ALB'<\/span>},\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'Algeria'<\/span>,\n    <span class=\"hljs-string\">'area'<\/span>: <span class=\"hljs-number\">2381741<\/span>,\n    <span class=\"hljs-string\">'country_code2'<\/span>: <span class=\"hljs-string\">'DZ'<\/span>,\n    <span class=\"hljs-string\">'country_code3'<\/span>: <span class=\"hljs-string\">'DZA'<\/span>},\n    {<span class=\"hljs-string\">'name'<\/span>: <span class=\"hljs-string\">'American Samoa'<\/span>,\n    <span class=\"hljs-string\">'area'<\/span>: <span class=\"hljs-number\">199<\/span>,\n    <span class=\"hljs-string\">'country_code2'<\/span>: <span class=\"hljs-string\">'AS'<\/span>,\n    <span class=\"hljs-string\">'country_code3'<\/span>: <span class=\"hljs-string\">'ASM'<\/span>}\n]\n\n<span class=\"hljs-keyword\">with<\/span> open(<span class=\"hljs-string\">'countries.csv'<\/span>, <span class=\"hljs-string\">'w'<\/span>, encoding=<span class=\"hljs-string\">'UTF8'<\/span>, newline=<span class=\"hljs-string\">''<\/span>) <span class=\"hljs-keyword\">as<\/span> f:\n    writer = csv.DictWriter(f, fieldnames=fieldnames)\n    writer.writeheader()\n    writer.writerows(rows)<\/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<p>How it works.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, define variables that hold the field names and data rows of the CSV file.<\/li>\n\n\n\n<li>Next, open the CSV file for writing by calling the <code>open()<\/code> function.<\/li>\n\n\n\n<li>Then, create a new instance of the <code>DictWriter<\/code> class by passing the file object (<code>f<\/code>) and <code>fieldnames<\/code> argument to it.<\/li>\n\n\n\n<li>After that, write the header for the CSV file by calling the <code>writeheader()<\/code> method.<\/li>\n\n\n\n<li>Finally, write data rows to the CSV file using the <code>writerows()<\/code> method.<\/li>\n<\/ul>\n\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 CSV Writer or the <code>DictWriter<\/code> class to write data to a CSV file.<\/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=write-csv\"\n  height=\"700\"\n  width=\"600\"\n  class=\"iframe\"\n><\/iframe>\n\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=\"764\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-write-csv-file\/\"\n\t\t\t\tdata-post-title=\"Python Write CSV File\"\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=\"764\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-write-csv-file\/\"\n\t\t\t\tdata-post-title=\"Python Write CSV File\"\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 write data into a CSV file using the built-in csv module. Steps for writing a CSV file # To write data into a CSV file, you follow these steps: The following code illustrates the above steps: It&#8217;ll be shorter if you use the with statement so that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":37,"menu_order":70,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-764","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/764","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=764"}],"version-history":[{"count":2,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/764\/revisions"}],"predecessor-version":[{"id":7232,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/764\/revisions\/7232"}],"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=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}