{"id":21875,"date":"2022-04-04T18:49:05","date_gmt":"2022-04-04T13:19:05","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=21875"},"modified":"2026-07-13T12:39:41","modified_gmt":"2026-07-13T07:09:41","slug":"python-d","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-d\/","title":{"rendered":"Python %d Formatting: Integer Placeholders and Modern Alternatives"},"content":{"rendered":"<p><strong>Quick answer:<\/strong> %d is an old-style Python string-formatting placeholder for decimal integers. It is still useful when maintaining legacy printf-style formatting, but f-strings are usually clearer for new code. Check the value type, argument shape, width, padding, and percent escaping when debugging a formatting error. Remember that the result is a string, so formatting belongs at the presentation boundary rather than inside arithmetic or data-validation logic. Keeping the numeric value numeric until output also makes rounding and localization decisions easier to test.<\/p>\n<figure class=\"pythonpool-article-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-d.png\" alt=\"Python Pool infographic explaining Python percent d integer formatting width zero padding and f-string alternatives\" width=\"1536\" height=\"1024\" loading=\"lazy\" decoding=\"async\"><figcaption>%d is an old-style decimal integer placeholder; understand its type and width rules when maintaining older Python code, then prefer f-strings for new code.<\/figcaption><\/figure>\n<p><strong><code>%d<\/code> in Python<\/strong> is an old-style string formatting placeholder for decimal integers. It is used with the <code>%<\/code> operator, usually in older Python code:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">age = 32\nprint(\"Age: %d\" % age)<\/code><\/pre>\n<\/div>\n<p>For new code, f-strings are usually clearer. Still, <code>%d<\/code> is part of Python 3&#8217;s documented printf-style string formatting, so you will still see it in existing projects.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Basic_d_formatting\" >Basic %d formatting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Format_multiple_integers\" >Format multiple integers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Set_width_and_zero_padding\" >Set width and zero padding<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Format_negative_integers\" >Format negative integers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/python-d\/#What_happens_with_floats\" >What happens with floats?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Print_a_literal_percent_sign\" >Print a literal percent sign<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Fix_TypeError_with_d\" >Fix TypeError with %d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/python-d\/#d_vs_s\" >%d vs %s<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Prefer_f-strings_in_new_code\" >Prefer f-strings in new code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Named_placeholders_with_d\" >Named placeholders with %d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/python-d\/#When_should_you_keep_formatting\" >When should you keep % formatting?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Common_mistakes\" >Common mistakes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Related_Python_guides\" >Related Python guides<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Official_references\" >Official references<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Format_One_Integer\" >Format One Integer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Format_Multiple_Values\" >Format Multiple Values<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Use_Width_And_Zero_Padding\" >Use Width And Zero Padding<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Compare_With_f-Strings_And_Debug_Types\" >Compare With f-Strings And Debug Types<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.pythonpool.com\/python-d\/#What_does_d_mean_in_Python\" >What does %d mean in Python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Why_does_d_raise_a_TypeError\" >Why does %d raise a TypeError?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.pythonpool.com\/python-d\/#How_do_I_add_zero_padding_with_d\" >How do I add zero padding with %d?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.pythonpool.com\/python-d\/#Should_I_use_d_or_an_f-string\" >Should I use %d or an f-string?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Basic_d_formatting\"><\/span>Basic %d formatting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Use <code>%d<\/code> where an integer should appear in a string, then provide the value after the <code>%<\/code> operator.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">age = 32\nprint(\"Age: %d\" % age)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Age: 32<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Format_multiple_integers\"><\/span>Format multiple integers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When the string has more than one placeholder, pass a tuple of values in the same order.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">apples = 5\noranges = 3\nprint(\"Apples: %d, oranges: %d\" % (apples, oranges))<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Apples: 5, oranges: 3<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Set_width_and_zero_padding\"><\/span>Set width and zero padding<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can add a minimum width between <code>%<\/code> and <code>d<\/code>. Add <code>0<\/code> before the width for zero padding.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">number = 42\nprint(\"%5d\" % number)\nprint(\"%05d\" % number)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># # output\n# +# 42\n# +# 00042<\/code><\/pre>\n<\/div>\n<p><code>%5d<\/code> pads with spaces to width 5. <code>%05d<\/code> pads with zeroes to width 5.<\/p>\n<p><!-- Python Pool visual layout repair 2026-07-13 --><\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/d-format-percent-b188.png\" alt=\"Python Pool infographic showing percent d, an integer value, a format string, and output\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>%d placeholder: Percent d, an integer value, a format string, and output.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Format_negative_integers\"><\/span>Format negative integers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><code>%d<\/code> works with negative integers too.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">temperature = -7\nprint(\"Temperature: %d C\" % temperature)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Temperature: -7 C<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_happens_with_floats\"><\/span>What happens with floats?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you pass a float to <code>%d<\/code>, Python converts it to an integer-style value by truncating toward zero. Use <code>%f<\/code>, f-strings, or <code>round()<\/code> when you need decimal output.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">value = 3.9\nprint(\"%d\" % value)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># 3<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Print_a_literal_percent_sign\"><\/span>Print a literal percent sign<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Use <code>%%<\/code> when you need a real percent sign in an old-style formatted string.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">progress = 80\nprint(\"Progress: %d%%\" % progress)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Progress: 80%<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Fix_TypeError_with_d\"><\/span>Fix TypeError with %d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><code>%d<\/code> expects a real number, not a string containing digits. Convert strings first if needed.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">try:\n    print(\"%d\" % \"42\")\nexcept TypeError as error:\n    print(type(error).__name__)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># TypeError<\/code><\/pre>\n<\/div>\n<p>If your input is <code>\"42\"<\/code>, use <code>int(value)<\/code> before formatting it as an integer.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/d-format-modern-b188.png\" alt=\"Python Pool infographic comparing percent formatting, str.format, and f-strings\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Modern formats: Percent formatting, str.format, and f-strings.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"d_vs_s\"><\/span>%d vs %s<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong><code>%d<\/code>:<\/strong> formats decimal integers.<\/li>\n<li><strong><code>%s<\/code>:<\/strong> converts the value to a string with <code>str()<\/code>.<\/li>\n<li><strong><code>%f<\/code>:<\/strong> formats floating-point numbers.<\/li>\n<\/ul>\n<p>Use <code>%d<\/code> when integer formatting matters, especially width or zero padding. Use <code>%s<\/code> only when generic string conversion is intended.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Prefer_f-strings_in_new_code\"><\/span>Prefer f-strings in new code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>F-strings and <code>str.format()<\/code> support integer formatting with the same <code>d<\/code> presentation type.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">count = 7\nprint(f\"Count: {count:d}\")\nprint(\"Count: {:d}\".format(count))<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Count: 7\n# Count: 7<\/code><\/pre>\n<\/div>\n<p>For new Python code, <code>f\"Count: {count:d}\"<\/code> is usually easier to read than <code>\"Count: %d\" % count<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Named_placeholders_with_d\"><\/span>Named placeholders with %d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Old-style formatting can also read values from a mapping. This is useful when the same value appears more than once or when named fields make an older format string easier to understand.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">values = {\"count\": 42}\nprint(\"Count: %(count)d\" % values)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\"># Count: 42<\/code><\/pre>\n<\/div>\n<p>The name inside <code>%(count)d<\/code> is looked up in the dictionary, and <code>d<\/code> still means decimal integer formatting.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/d-format-types-b188.png\" alt=\"Python Pool infographic mapping integer conversion, bool values, width, precision, and display\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Integer types: Integer conversion, bool values, width, precision, and display.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"When_should_you_keep_formatting\"><\/span>When should you keep % formatting?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Keep <code>%<\/code> formatting when you are maintaining existing code, matching a codebase style, or working with APIs that already expect printf-style format strings. For new application code, f-strings are normally easier to read and refactor. If you are updating old code, convert gradually and keep tests around behavior such as padding, percent signs, and numeric conversion.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Common_mistakes\"><\/span>Common mistakes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Forgetting the tuple:<\/strong> use <code>\"%d %d\" % (a, b)<\/code> for multiple values.<\/li>\n<li><strong>Passing a numeric string:<\/strong> convert with <code>int(value)<\/code> before using <code>%d<\/code>.<\/li>\n<li><strong>Using <code>%d<\/code> for decimals:<\/strong> use <code>%f<\/code> or f-string precision for floats.<\/li>\n<li><strong>Forgetting <code>%%<\/code>:<\/strong> use two percent signs for a literal percent character.<\/li>\n<li><strong>Writing new code in old style:<\/strong> prefer f-strings unless you are maintaining existing <code>%<\/code> formatting.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Related_Python_guides\"><\/span>Related Python guides<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/www.pythonpool.com\/python-s\/\">Python %s string formatting<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/python-user-input\/\">Python user input<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/typeerror-int-object-is-not-subscriptable\/\">int object is not subscriptable<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/append-strings-python\/\">Append strings in Python<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/python-translate\/\">Python translate()<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/python-inline-if\/\">Python inline if<\/a><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Official_references\"><\/span>Official references<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#printf-style-string-formatting\" rel=\"noopener\">Python documentation: printf-style string formatting<\/a><\/li>\n<li><a href=\"https:\/\/docs.python.org\/3\/library\/string.html#formatstrings\" rel=\"noopener\">Python documentation: format string syntax<\/a><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><code>%d<\/code> formats integers in Python&#8217;s old-style <code>%<\/code> formatting system. It is useful to understand for existing code, width, and zero-padding examples, but f-strings are usually the better default for new Python code.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Format_One_Integer\"><\/span>Format One Integer<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Place %d inside a string and provide an integer-compatible value after the % operator. The placeholder formats decimal output rather than preserving the value&#8217;s original representation, so the result is text.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">age = 32\nmessage = \"Age: %d\" % age\nprint(message)\nprint(type(message).__name__)<\/code><\/pre>\n<\/div>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/d-format-check-b188.png\" alt=\"Python Pool infographic testing placeholders, tuples, escaping percent signs, and validation\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Format checks: Placeholders, tuples, escaping percent signs, and validation.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Format_Multiple_Values\"><\/span>Format Multiple Values<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Multiple placeholders require a tuple of values in the same order. A single value tuple needs a trailing comma, and mixing tuple formatting with a non-tuple value is a common source of confusing TypeError messages.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">year = 2026\nmonth = 7\nday = 11\nprint(\"%04d-%02d-%02d\" % (year, month, day))\n\nsingle = (7,)\nprint(\"month=%d\" % single)<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Use_Width_And_Zero_Padding\"><\/span>Use Width And Zero Padding<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A width controls the minimum field length, while a leading zero requests zero padding for numeric output. Width is a minimum, not a truncation rule, so a number with more digits remains intact. Keep formatting rules close to the output contract. This is useful for identifiers, dates, and fixed-width reports, but padding changes presentation only; it does not change the underlying integer and should not be used to preserve numeric values with leading zeroes in calculations.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">number = 42\nprint(\"%5d\" % number)\nprint(\"%05d\" % number)\nprint(\"%d%% complete\" % 75)<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Compare_With_f-Strings_And_Debug_Types\"><\/span>Compare With f-Strings And Debug Types<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For new Python 3 code, an f-string usually makes the expression and format specification easier to read. When %d fails, print the value&#8217;s type and inspect whether a tuple was intended; do not hide a data-model error with an arbitrary cast.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">value = 42\nprint(f\"value={value:d}\")\n\ntry:\n    print(\"value=%d\" % \"42\")\nexcept TypeError as error:\n    print(type(\"42\").__name__, error)<\/code><\/pre>\n<\/div>\n<p>The Python <a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#printf-style-string-formatting\">printf-style formatting reference<\/a> documents %d, width, flags, and argument rules. Use f-strings from the <a href=\"https:\/\/docs.python.org\/3\/reference\/lexical_analysis.html#f-strings\">modern string-formatting syntax<\/a> for new code when compatible.<\/p>\n<p>For related numeric string output, compare <a href=\"https:\/\/www.pythonpool.com\/python-s\/\">%s formatting<\/a>, <a href=\"https:\/\/www.pythonpool.com\/python-float-to-string\/\">float-to-string conversion<\/a>, and <a href=\"https:\/\/www.pythonpool.com\/python-round\/\">rounding numbers<\/a> when choosing whether to format, convert, or round a value.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_does_d_mean_in_Python\"><\/span>What does %d mean in Python?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>%d is an old-style string-formatting placeholder that formats a value as a decimal integer.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_does_d_raise_a_TypeError\"><\/span>Why does %d raise a TypeError?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The supplied value may not be an integer-compatible value, or the formatting operator may receive the wrong number or shape of arguments.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_add_zero_padding_with_d\"><\/span>How do I add zero padding with %d?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Use a width and zero flag such as %05d to produce a five-character decimal field with leading zeroes.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Should_I_use_d_or_an_f-string\"><\/span>Should I use %d or an f-string?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Use f-strings for new code when the project supports them; keep %d when maintaining legacy formatting or matching an existing interface.<\/p>\n<p><script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"What does %d mean in Python?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"%d is an old-style string-formatting placeholder that formats a value as a decimal integer.\"}},{\"@type\":\"Question\",\"name\":\"Why does %d raise a TypeError?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The supplied value may not be an integer-compatible value, or the formatting operator may receive the wrong number or shape of arguments.\"}},{\"@type\":\"Question\",\"name\":\"How do I add zero padding with %d?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use a width and zero flag such as %05d to produce a five-character decimal field with leading zeroes.\"}},{\"@type\":\"Question\",\"name\":\"Should I use %d or an f-string?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use f-strings for new code when the project supports them; keep %d when maintaining legacy formatting or matching an existing interface.\"}}]}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.<\/p>\n","protected":false},"author":29,"featured_media":32200,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[5125,5126,5127,5128],"class_list":["post-21875","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-python-d-format","tag-python-d-meaning","tag-python-d-print","tag-python-d-type","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python %d Formatting: Integer Placeholders and Modern Alternatives<\/title>\n<meta name=\"description\" content=\"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/python-d\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python %d Formatting: Integer Placeholders and Modern Alternatives\" \/>\n<meta property=\"og:description\" content=\"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-d\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-04T13:19:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-13T07:09:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-d.png\" \/>\n<meta name=\"author\" content=\"Nikhil Omkar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Python Pool\" \/>\n<meta name=\"twitter:description\" content=\"Practical Python tutorials, error fixes, code examples, and project guides.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-d.png\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil Omkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/\"},\"author\":{\"name\":\"Nikhil Omkar\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/person\\\/6faa89103f0ea990a146386f20d1454f\"},\"headline\":\"Python %d Formatting: Integer Placeholders and Modern Alternatives\",\"datePublished\":\"2022-04-04T13:19:05+00:00\",\"dateModified\":\"2026-07-13T07:09:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/\"},\"wordCount\":1003,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/python-percent-d-integer-formatting.png\",\"keywords\":[\"python d format\",\"python d meaning\",\"python d print\",\"python d type\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/\",\"name\":\"Python %d Formatting: Integer Placeholders and Modern Alternatives\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/python-percent-d-integer-formatting.png\",\"datePublished\":\"2022-04-04T13:19:05+00:00\",\"dateModified\":\"2026-07-13T07:09:41+00:00\",\"description\":\"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/python-percent-d-integer-formatting.png\",\"contentUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/python-percent-d-integer-formatting.png\",\"width\":1350,\"height\":650,\"caption\":\"Python percent d integer string formatting and f-string alternatives\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-d\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pythonpool.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python %d Formatting: Integer Placeholders and Modern Alternatives\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#website\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/\",\"name\":\"Python Pool\",\"description\":\"Practical Python tutorials, error fixes, code examples, and project guides.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pythonpool.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/aa.png\",\"contentUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/pythonpool\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/person\\\/6faa89103f0ea990a146386f20d1454f\",\"name\":\"Nikhil Omkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g\",\"caption\":\"Nikhil Omkar\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python %d Formatting: Integer Placeholders and Modern Alternatives","description":"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.","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:\/\/www.pythonpool.com\/python-d\/","og_locale":"en_US","og_type":"article","og_title":"Python %d Formatting: Integer Placeholders and Modern Alternatives","og_description":"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.","og_url":"https:\/\/www.pythonpool.com\/python-d\/","og_site_name":"Python Pool","article_published_time":"2022-04-04T13:19:05+00:00","article_modified_time":"2026-07-13T07:09:41+00:00","og_image":[{"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-d.png","type":"","width":"","height":""}],"author":"Nikhil Omkar","twitter_card":"summary_large_image","twitter_title":"Python Pool","twitter_description":"Practical Python tutorials, error fixes, code examples, and project guides.","twitter_image":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-d.png","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Nikhil Omkar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-d\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-d\/"},"author":{"name":"Nikhil Omkar","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/6faa89103f0ea990a146386f20d1454f"},"headline":"Python %d Formatting: Integer Placeholders and Modern Alternatives","datePublished":"2022-04-04T13:19:05+00:00","dateModified":"2026-07-13T07:09:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-d\/"},"wordCount":1003,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-d\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/04\/python-percent-d-integer-formatting.png","keywords":["python d format","python d meaning","python d print","python d type"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-d\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-d\/","url":"https:\/\/www.pythonpool.com\/python-d\/","name":"Python %d Formatting: Integer Placeholders and Modern Alternatives","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-d\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-d\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/04\/python-percent-d-integer-formatting.png","datePublished":"2022-04-04T13:19:05+00:00","dateModified":"2026-07-13T07:09:41+00:00","description":"Use Python %d formatting for integers, width, zero padding, multiple values, and percent signs, then compare it with f-strings.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-d\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-d\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-d\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/04\/python-percent-d-integer-formatting.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/04\/python-percent-d-integer-formatting.png","width":1350,"height":650,"caption":"Python percent d integer string formatting and f-string alternatives"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-d\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Python %d Formatting: Integer Placeholders and Modern Alternatives"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Practical Python tutorials, error fixes, code examples, and project guides.","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/6faa89103f0ea990a146386f20d1454f","name":"Nikhil Omkar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fe4e6cc08faea13ecb485e806625e9046dc70ffa984ada89243748e5353d3c13?s=96&d=wavatar&r=g","caption":"Nikhil Omkar"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/21875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=21875"}],"version-history":[{"count":69,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/21875\/revisions"}],"predecessor-version":[{"id":41863,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/21875\/revisions\/41863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/32200"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=21875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=21875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=21875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}