{"id":3570,"date":"2020-07-13T17:58:07","date_gmt":"2020-07-13T12:28:07","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=3570"},"modified":"2026-07-13T12:27:20","modified_gmt":"2026-07-13T06:57:20","slug":"python-palindrome","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-palindrome\/","title":{"rendered":"Palindrome in Python: Strings, Numbers, and Cleaned Text"},"content":{"rendered":"<p><strong>Quick answer:<\/strong> A palindrome reads the same forward and backward under a chosen comparison rule. For a simple string, compare text with text[::-1]; for cleaned phrases, normalize case and punctuation first; for large inputs, a two-pointer scan avoids creating a second full string.<\/p>\n<figure class=\"pythonpool-article-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome.png\" alt=\"Python Pool infographic comparing palindrome checks with slicing, reversed, loops, and normalization\" width=\"1536\" height=\"1024\" loading=\"lazy\" decoding=\"async\"><figcaption>A palindrome reads the same in both directions; choose a comparison rule first, then use slicing, reversed(), or a two-pointer loop.<\/figcaption><\/figure>\n<p>A palindrome is a value that reads the same forward and backward. Common examples include <code>racecar<\/code>, <code>level<\/code>, <code>12321<\/code>, and cleaned phrases such as <code>A man, a plan, a canal: Panama<\/code>.<\/p>\n<p>In Python, the simplest palindrome check compares a sequence with its reversed version. For real input, normalize the value first so capitalization, spaces, and punctuation do not change the result.<\/p>\n<p>The best method depends on the task. Use slicing for clean strings, normalization for phrases, a two-pointer loop for algorithm practice, and digit reversal when the requirement says not to convert numbers to strings. Keeping those cases separate makes the code easier to test and explain.<\/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-palindrome\/#Check_a_string_palindrome_with_slicing\" >Check a string palindrome with slicing<\/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-palindrome\/#Normalize_case_and_punctuation\" >Normalize case and punctuation<\/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-palindrome\/#Check_a_palindrome_with_reversed\" >Check a palindrome with reversed()<\/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-palindrome\/#Check_a_palindrome_with_two_pointers\" >Check a palindrome with two pointers<\/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-palindrome\/#Check_whether_a_number_is_a_palindrome\" >Check whether a number is a palindrome<\/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-palindrome\/#Read_a_palindrome_from_user_input\" >Read a palindrome from user input<\/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-palindrome\/#Find_the_longest_palindromic_substring\" >Find the longest palindromic substring<\/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-palindrome\/#Common_palindrome_mistakes\" >Common palindrome mistakes<\/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-palindrome\/#Conclusion\" >Conclusion<\/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-palindrome\/#Check_A_Simple_String\" >Check A Simple String<\/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-palindrome\/#Normalize_Human_Text\" >Normalize Human Text<\/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-palindrome\/#Check_Numbers_And_Other_Sequences\" >Check Numbers And Other Sequences<\/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-palindrome\/#Choose_A_Memory_Policy\" >Choose A Memory Policy<\/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-palindrome\/#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-15\" href=\"https:\/\/www.pythonpool.com\/python-palindrome\/#How_do_I_check_a_palindrome_in_Python\" >How do I check a palindrome in Python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pythonpool.com\/python-palindrome\/#How_do_I_check_a_number_palindrome\" >How do I check a number palindrome?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pythonpool.com\/python-palindrome\/#How_do_I_ignore_spaces_and_punctuation\" >How do I ignore spaces and punctuation?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.pythonpool.com\/python-palindrome\/#Is_an_empty_string_a_palindrome\" >Is an empty string a palindrome?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Check_a_string_palindrome_with_slicing\"><\/span>Check a string palindrome with slicing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Slicing is the shortest and most readable way to reverse a Python string. The slice <code>[::-1]<\/code> walks through the string from right to left.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_palindrome(text):\n    return text == text[::-1]\n\nprint(is_palindrome(\"level\"))\nprint(is_palindrome(\"python\"))<\/code><\/pre>\n<\/div>\n<p>This is the best default for simple interview examples and small scripts. The Python docs for <a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#common-sequence-operations\">common sequence operations<\/a> explain slicing behavior. Python Pool&#8217;s <a href=\"https:\/\/www.pythonpool.com\/python-substring\/\">Python substring<\/a> guide has more slicing examples.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Normalize_case_and_punctuation\"><\/span>Normalize case and punctuation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>User input often includes uppercase letters, spaces, punctuation, or symbols. Normalize the text by keeping only alphanumeric characters and converting everything to lowercase.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def normalize(text):\n    return \"\".join(char.lower() for char in text if char.isalnum())\n\ndef is_phrase_palindrome(text):\n    cleaned = normalize(text)\n    return cleaned == cleaned[::-1]\n\nphrase = \"A man, a plan, a canal: Panama\"\nprint(is_phrase_palindrome(phrase))<\/code><\/pre>\n<\/div>\n<p>This approach handles phrases without needing a long list of punctuation rules. It also makes tests predictable because all input goes through one cleanup step before comparison. If you need only lowercase conversion, see Python Pool&#8217;s <a href=\"https:\/\/www.pythonpool.com\/python-lowercase\/\">Python lowercase<\/a> guide. For more advanced text cleanup, the official Python <a href=\"https:\/\/docs.python.org\/3\/library\/re.html\">re module documentation<\/a> covers regular expressions.<\/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\/palindrome-string-b203.png\" alt=\"Python Pool infographic showing text, reverse text, comparison, and palindrome result\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>A string is a palindrome when it equals its reversed form under the chosen rules.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Check_a_palindrome_with_reversed\"><\/span>Check a palindrome with reversed()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The built-in <code>reversed()<\/code> function returns an iterator. Join it back into a string before comparing.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_palindrome_reversed(text):\n    return text == \"\".join(reversed(text))\n\nprint(is_palindrome_reversed(\"radar\"))<\/code><\/pre>\n<\/div>\n<p>The official <a href=\"https:\/\/docs.python.org\/3\/library\/functions.html#reversed\">reversed() documentation<\/a> explains the function. Slicing is usually shorter for strings, while <code>reversed()<\/code> can be clearer when you are teaching iterators.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Check_a_palindrome_with_two_pointers\"><\/span>Check a palindrome with two pointers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A two-pointer loop compares characters from the outside toward the center. It avoids building a reversed copy of the string and makes the comparison logic explicit.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_palindrome_loop(text):\n    left = 0\n    right = len(text) - 1\n\n    while left < right:\n        if text[left] != text[right]:\n            return False\n        left += 1\n        right -= 1\n\n    return True\n\nprint(is_palindrome_loop(\"madam\"))<\/code><\/pre>\n<\/div>\n<p>This pattern is useful in algorithm questions because it can be adapted for lists, arrays, and custom filtering. The Python tutorial section on <a href=\"https:\/\/docs.python.org\/3\/tutorial\/controlflow.html#for-statements\">control flow<\/a> is a good refresher for loops.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Check_whether_a_number_is_a_palindrome\"><\/span>Check whether a number is a palindrome<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The easiest number check is to convert the integer to a string, then reuse the string logic. Decide how your program should handle negative numbers before checking.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_number_palindrome(number):\n    text = str(number)\n    return text == text[::-1]\n\nprint(is_number_palindrome(12321))\nprint(is_number_palindrome(12345))<\/code><\/pre>\n<\/div>\n<p>If you want a numeric-only version, reverse the digits with division and modulo. Negative numbers are usually treated as not palindromes because of the minus sign.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_number_palindrome_math(number):\n    if number < 0:\n        return False\n\n    original = number\n    reversed_number = 0\n\n    while number > 0:\n        reversed_number = reversed_number * 10 + number % 10\n        number \/\/= 10\n\n    return original == reversed_number\n\nprint(is_number_palindrome_math(1221))<\/code><\/pre>\n<\/div>\n<p>For other number-checking patterns, see Python Pool's <a href=\"https:\/\/www.pythonpool.com\/check-if-number-is-prime-in-python\/\">prime number in Python<\/a> guide.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/palindrome-clean-b203.png\" alt=\"Python Pool infographic mapping raw text through lowercase, filtering, reverse, and comparison\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Normalize case and remove selected characters when punctuation and spaces should be ignored.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Read_a_palindrome_from_user_input\"><\/span>Read a palindrome from user input<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When reading from the terminal, normalize the input before checking. That gives users a friendlier result for phrases and mixed capitalization.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">text = input(\"Enter text: \")\n\nif is_phrase_palindrome(text):\n    print(\"Palindrome\")\nelse:\n    print(\"Not a palindrome\")<\/code><\/pre>\n<\/div>\n<p>Python Pool's <a href=\"https:\/\/www.pythonpool.com\/python-user-input\/\">Python user input<\/a> guide covers the <code>input()<\/code> function and common input-handling patterns.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Find_the_longest_palindromic_substring\"><\/span>Find the longest palindromic substring<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For a compact solution, expand around each possible center. A palindrome can have one center character, such as <code>racecar<\/code>, or two center characters, such as <code>abba<\/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\">def longest_palindrome(text):\n    def expand(left, right):\n        while left >= 0 and right < len(text) and text[left] == text[right]:\n            left -= 1\n            right += 1\n        return text[left + 1:right]\n\n    best = \"\"\n    for index in range(len(text)):\n        odd = expand(index, index)\n        even = expand(index, index + 1)\n        best = max(best, odd, even, key=len)\n\n    return best\n\nprint(longest_palindrome(\"babad\"))<\/code><\/pre>\n<\/div>\n<p>This example is still simple enough for learning, but it introduces an important algorithmic idea: solve the problem around each center instead of checking every substring blindly. For iterator slicing patterns, see Python Pool's <a href=\"https:\/\/www.pythonpool.com\/pythons-itertools-islice\/\">itertools.islice()<\/a> guide. For string splitting examples, see <a href=\"https:\/\/www.pythonpool.com\/python-split-a-string-in-half\/\">split a string in half<\/a>.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/palindrome-number-b203.png\" alt=\"Python Pool infographic comparing an integer, digits, reverse digits, and equality\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Numeric palindrome checks can compare digit sequences without converting to arbitrary text.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Common_palindrome_mistakes\"><\/span>Common palindrome mistakes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Not normalizing input.<\/strong> <code>Racecar<\/code> should usually match <code>racecar<\/code>, so lowercase the text when checking user-facing phrases.<\/p>\n<p><strong>Forgetting punctuation.<\/strong> Phrase examples often include spaces and commas. Keep only alphanumeric characters when that is the desired behavior.<\/p>\n<p><strong>Changing the original value too early.<\/strong> In numeric reversal, store the original number before dividing it down to zero.<\/p>\n<p><strong>Overcomplicating simple checks.<\/strong> For ordinary strings, <code>text == text[::-1]<\/code> is clear, fast enough, and easy to review.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For most Python palindrome checks, use slicing after normalizing the input. Use <code>reversed()<\/code> when you want to demonstrate iterators, a two-pointer loop when you want explicit algorithm logic, and digit reversal when the task requires a numeric-only solution.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Check_A_Simple_String\"><\/span>Check A Simple String<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Slicing with a step of -1 produces the characters in reverse order. It is concise and clear for ordinary strings, but it allocates a reversed string, so a streaming or memory-sensitive workload may prefer a two-pointer comparison.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def is_palindrome(text):\n    return text == text[::-1]\n\nprint(is_palindrome(\"level\"))\nprint(is_palindrome(\"python\"))<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Normalize_Human_Text\"><\/span>Normalize Human Text<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Natural-language palindrome questions usually define spaces, punctuation, and case as irrelevant. Use casefold() for robust case-insensitive comparison and retain only the characters your rule considers meaningful. Document that policy because it changes the answer.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">import re\n\ndef normalized(text):\n    return \"\".join(re.findall(r\"[a-z0-9]\", text.casefold()))\n\ndef is_cleaned_palindrome(text):\n    value = normalized(text)\n    return value == value[::-1]\n\nprint(is_cleaned_palindrome(\"A man, a plan, a canal: Panama!\"))<\/code><\/pre>\n<\/div>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/palindrome-check-b203.png\" alt=\"Python Pool infographic testing Unicode, empty input, normalization, negatives, and validation\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Define empty-input, Unicode, punctuation, negative-number, and normalization policies.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Check_Numbers_And_Other_Sequences\"><\/span>Check Numbers And Other Sequences<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For a numeric palindrome, converting to text is readable and handles the decimal representation directly. If a specification forbids strings, reverse the digits arithmetically while preserving the sign rule. The same forward-versus-reverse idea works for tuples and lists.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def number_palindrome(number):\n    if number &lt; 0:\n        return False\n    digits = str(number)\n    return digits == digits[::-1]\n\nprint(number_palindrome(1221))\nprint(number_palindrome(120))\nprint((1, 2, 1) == (1, 2, 1)[::-1])<\/code><\/pre>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Choose_A_Memory_Policy\"><\/span>Choose A Memory Policy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For a short value, slicing is the most readable option. A two-pointer loop compares matching positions from the ends and can return as soon as a mismatch appears. An empty string is mathematically a palindrome under the usual definition, but an input validator may reject it separately.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">def two_pointer_palindrome(text):\n    left = 0\n    right = len(text) - 1\n    while left &lt; right:\n        if text[left] != text[right]:\n            return False\n        left += 1\n        right -= 1\n    return True\n\nprint(two_pointer_palindrome(\"racecar\"))\nprint(two_pointer_palindrome(\"\"))<\/code><\/pre>\n<\/div>\n<p>Python's official <a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#common-sequence-operations\">sequence operations<\/a> reference documents slicing, and the <a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#str.casefold\">casefold()<\/a> reference explains case-insensitive text normalization.<\/p>\n<p>For related string preparation, compare <a href=\"https:\/\/www.pythonpool.com\/python-string-length\/\">string length<\/a>, <a href=\"https:\/\/www.pythonpool.com\/remove-punctuation-python\/\">removing punctuation<\/a>, and <a href=\"https:\/\/www.pythonpool.com\/python-remove-whitespace\/\">removing whitespace<\/a> before applying a palindrome rule.<\/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=\"How_do_I_check_a_palindrome_in_Python\"><\/span>How do I check a palindrome in Python?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For a string, compare the value with its reverse, commonly with text == text[::-1].<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_check_a_number_palindrome\"><\/span>How do I check a number palindrome?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Convert the number to text for a simple check, or reverse its digits mathematically when avoiding string conversion is a requirement.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_ignore_spaces_and_punctuation\"><\/span>How do I ignore spaces and punctuation?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Normalize the input by case-folding and retaining only the characters relevant to the comparison before reversing it.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_an_empty_string_a_palindrome\"><\/span>Is an empty string a palindrome?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Under the usual definition, yes: it reads the same forward and backward, although an application may choose a different validation policy.<\/p>\n<p><script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"How do I check a palindrome in Python?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"For a string, compare the value with its reverse, commonly with text == text[::-1].\"}},{\"@type\":\"Question\",\"name\":\"How do I check a number palindrome?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Convert the number to text for a simple check, or reverse its digits mathematically when avoiding string conversion is a requirement.\"}},{\"@type\":\"Question\",\"name\":\"How do I ignore spaces and punctuation?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Normalize the input by case-folding and retaining only the characters relevant to the comparison before reversing it.\"}},{\"@type\":\"Question\",\"name\":\"Is an empty string a palindrome?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Under the usual definition, yes: it reads the same forward and backward, although an application may choose a different validation policy.\"}}]}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.<\/p>\n","protected":false},"author":3,"featured_media":32329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,15],"tags":[1494,1476,1478,1487,1492,1491,1489,1479,1480,1493,1486,1475,1488,1483,1484,1477,1481,1485,1490,1482],"class_list":["post-3570","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programs","category-tutorials","tag-build-a-palindrome-hackerrank-solution-python","tag-check-if-string-is-palindrome-python","tag-check-palindrome-python","tag-how-to-check-if-a-string-is-a-palindrome-in-python","tag-is-palindrome-python","tag-is-python-a-palindrome","tag-making-string-palindrome-python","tag-palindrome-in-python","tag-palindrome-linked-list-python","tag-palindrome-number-python","tag-palindrome-permutation-python","tag-palindrome-program-in-python","tag-palindrome-python","tag-palindrome-python-code","tag-python-how-to-check-palindrome","tag-python-palindrome","tag-python-palindrome-code","tag-python-palindrome-function","tag-python-palindrome-program","tag-python-program-for-palindrome","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>Palindrome in Python: Strings, Numbers, and Cleaned Text<\/title>\n<meta name=\"description\" content=\"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.\" \/>\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-palindrome\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Palindrome in Python: Strings, Numbers, and Cleaned Text\" \/>\n<meta property=\"og:description\" content=\"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-palindrome\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-13T12:28:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-13T06:57:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome.png\" \/>\n<meta name=\"author\" content=\"Ashwini Mandani\" \/>\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-palindrome.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=\"Ashwini Mandani\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/\"},\"author\":{\"name\":\"Ashwini Mandani\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/person\\\/8a75fb48eb1f3dc952df65a8c28ac056\"},\"headline\":\"Palindrome in Python: Strings, Numbers, and Cleaned Text\",\"datePublished\":\"2020-07-13T12:28:07+00:00\",\"dateModified\":\"2026-07-13T06:57:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/\"},\"wordCount\":1070,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/python-palindrome-guide-pythonpool.png\",\"keywords\":[\"build a palindrome hackerrank solution python\",\"check if string is palindrome python\",\"check palindrome python\",\"how to check if a string is a palindrome in python\",\"is palindrome python\",\"is python a palindrome\",\"making string palindrome python\",\"palindrome in python\",\"palindrome linked list python\",\"palindrome number python\",\"palindrome permutation python\",\"palindrome program in python\",\"palindrome python\",\"palindrome python code\",\"python how to check palindrome\",\"python palindrome\",\"python palindrome code\",\"python palindrome function\",\"python palindrome program\",\"python program for palindrome\"],\"articleSection\":[\"Programs\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/\",\"name\":\"Palindrome in Python: Strings, Numbers, and Cleaned Text\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/python-palindrome-guide-pythonpool.png\",\"datePublished\":\"2020-07-13T12:28:07+00:00\",\"dateModified\":\"2026-07-13T06:57:20+00:00\",\"description\":\"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/python-palindrome-guide-pythonpool.png\",\"contentUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/python-palindrome-guide-pythonpool.png\",\"width\":1350,\"height\":650,\"caption\":\"Python palindrome guide showing string reversal slicing cleaned phrases and palindrome examples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-palindrome\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pythonpool.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Palindrome in Python: Strings, Numbers, and Cleaned Text\"}]},{\"@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\\\/8a75fb48eb1f3dc952df65a8c28ac056\",\"name\":\"Ashwini Mandani\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"caption\":\"Ashwini Mandani\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Palindrome in Python: Strings, Numbers, and Cleaned Text","description":"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.","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-palindrome\/","og_locale":"en_US","og_type":"article","og_title":"Palindrome in Python: Strings, Numbers, and Cleaned Text","og_description":"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.","og_url":"https:\/\/www.pythonpool.com\/python-palindrome\/","og_site_name":"Python Pool","article_published_time":"2020-07-13T12:28:07+00:00","article_modified_time":"2026-07-13T06:57:20+00:00","og_image":[{"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome.png","type":"","width":"","height":""}],"author":"Ashwini Mandani","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-palindrome.png","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Ashwini Mandani","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/"},"author":{"name":"Ashwini Mandani","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056"},"headline":"Palindrome in Python: Strings, Numbers, and Cleaned Text","datePublished":"2020-07-13T12:28:07+00:00","dateModified":"2026-07-13T06:57:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/"},"wordCount":1070,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome-guide-pythonpool.png","keywords":["build a palindrome hackerrank solution python","check if string is palindrome python","check palindrome python","how to check if a string is a palindrome in python","is palindrome python","is python a palindrome","making string palindrome python","palindrome in python","palindrome linked list python","palindrome number python","palindrome permutation python","palindrome program in python","palindrome python","palindrome python code","python how to check palindrome","python palindrome","python palindrome code","python palindrome function","python palindrome program","python program for palindrome"],"articleSection":["Programs","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-palindrome\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-palindrome\/","url":"https:\/\/www.pythonpool.com\/python-palindrome\/","name":"Palindrome in Python: Strings, Numbers, and Cleaned Text","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome-guide-pythonpool.png","datePublished":"2020-07-13T12:28:07+00:00","dateModified":"2026-07-13T06:57:20+00:00","description":"Check palindromes in Python with slicing, reversed(), loops, numbers, normalization, and clear handling of spaces and punctuation.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-palindrome\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome-guide-pythonpool.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-palindrome-guide-pythonpool.png","width":1350,"height":650,"caption":"Python palindrome guide showing string reversal slicing cleaned phrases and palindrome examples"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-palindrome\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Palindrome in Python: Strings, Numbers, and Cleaned Text"}]},{"@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\/8a75fb48eb1f3dc952df65a8c28ac056","name":"Ashwini Mandani","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","caption":"Ashwini Mandani"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3570","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=3570"}],"version-history":[{"count":16,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3570\/revisions"}],"predecessor-version":[{"id":41387,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3570\/revisions\/41387"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/32329"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=3570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=3570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=3570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}