{"id":21734,"date":"2022-03-30T14:02:52","date_gmt":"2022-03-30T08:32:52","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=21734"},"modified":"2026-07-14T19:49:26","modified_gmt":"2026-07-14T14:19:26","slug":"python-copy-list","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-copy-list\/","title":{"rendered":"Copy a List in Python: Slicing, copy(), and deepcopy()"},"content":{"rendered":"<p><strong>Quick answer:<\/strong> Assignment creates another reference to a list. Use slicing, list(), or copy() for a shallow copy of the outer list, and use copy.deepcopy only when nested mutable objects must be independent and the ownership and performance costs are understood.<\/p>\n<figure class=\"pythonpool-article-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-b121.png\" alt=\"Python Pool infographic comparing Python list aliasing, shallow copies, and deep copies across nested mutable values\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>A shallow list copy duplicates the outer container but keeps references to nested objects; choose deep copying only when the nested ownership contract requires it.<\/figcaption><\/figure>\n<p>To <strong>copy a list in Python<\/strong>, use <code>list.copy()<\/code>, slicing, or <code>list()<\/code> for a shallow copy. Use <code>copy.deepcopy()<\/code> only when the list contains nested mutable objects and you need the nested objects copied too.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">copied = original.copy()<\/code><\/pre>\n<\/div>\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-copy-list\/#Assignment_does_not_copy_a_list\" >Assignment does not copy a list<\/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-copy-list\/#Copy_a_list_with_listcopy\" >Copy a list with list.copy()<\/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-copy-list\/#Copy_a_list_with_slicing\" >Copy a list with slicing<\/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-copy-list\/#Copy_a_list_with_list\" >Copy a list with list()<\/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-copy-list\/#Shallow_copy_vs_deep_copy\" >Shallow copy vs deep copy<\/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-copy-list\/#Copy_nested_lists_with_deepcopy\" >Copy nested lists with deepcopy()<\/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-copy-list\/#Use_list_comprehension_when_changing_values\" >Use list comprehension when changing values<\/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-copy-list\/#Avoid_repeated_nested_list_traps\" >Avoid repeated nested list traps<\/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-copy-list\/#Which_method_should_you_use\" >Which method should you use?<\/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-copy-list\/#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-11\" href=\"https:\/\/www.pythonpool.com\/python-copy-list\/#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-12\" href=\"https:\/\/www.pythonpool.com\/python-copy-list\/#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-13\" href=\"https:\/\/www.pythonpool.com\/python-copy-list\/#Conclusion\" >Conclusion<\/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-copy-list\/#Recognize_Aliases\" >Recognize Aliases<\/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-copy-list\/#Make_A_Shallow_Copy\" >Make A Shallow Copy<\/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-copy-list\/#Handle_Nested_Lists\" >Handle Nested Lists<\/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-copy-list\/#Use_Deepcopy_Carefully\" >Use Deepcopy Carefully<\/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-copy-list\/#Prefer_Explicit_Construction\" >Prefer Explicit Construction<\/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-copy-list\/#Test_Identity_And_Values\" >Test Identity And Values<\/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-copy-list\/#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-copy-list\/#How_do_I_make_a_shallow_copy_of_a_Python_list\" >How do I make a shallow copy of a Python list?<\/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-copy-list\/#When_should_I_use_deepcopy\" >When should I use deepcopy?<\/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-copy-list\/#Why_did_changing_the_copied_list_change_the_original\" >Why did changing the copied list change the original?<\/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-copy-list\/#Is_assignment_a_list_copy\" >Is assignment a list copy?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Assignment_does_not_copy_a_list\"><\/span>Assignment does not copy a list<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <code>=<\/code> operator does not copy a list. It creates another name for the same list object. If you mutate the alias, the original changes too.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">numbers = [1, 2, 3]\nalias = numbers\n\nalias.append(4)\nprint(numbers)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">[1, 2, 3, 4]<\/code><\/pre>\n<\/div>\n<p>Use assignment when you intentionally want two names pointing to the same list. Use a copy method when you want a separate list container.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Copy_a_list_with_listcopy\"><\/span>Copy a list with list.copy()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><code>list.copy()<\/code> is the clearest way to make a shallow copy of a list in modern Python.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">numbers = [1, 2, 3]\ncopied = numbers.copy()\n\ncopied.append(4)\nprint(numbers)\nprint(copied)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">[1, 2, 3]\n[1, 2, 3, 4]<\/code><\/pre>\n<\/div>\n<p>The copied list gets the appended value, while the original list remains unchanged.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Copy_a_list_with_slicing\"><\/span>Copy a list with slicing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Slicing the whole list with <code>[:]<\/code> creates the same kind of shallow copy. You will still see this pattern in many Python codebases.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">numbers = [1, 2, 3]\ncopied = numbers[:]\nprint(copied)<\/code><\/pre>\n<\/div>\n<p>Use <code>numbers.copy()<\/code> when readability matters most, and <code>numbers[:]<\/code> when you are already working with slices.<\/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\/python-copy-list-alias-b121.png\" alt=\"Python Pool infographic showing assignment binding two names to one mutable list and a shared mutation\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>List aliases: Assignment binding two names to one mutable list and a shared mutation.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Copy_a_list_with_list\"><\/span>Copy a list with list()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <code>list()<\/code> constructor also creates a new list from an iterable. It is useful when the source might be another iterable, such as a tuple, generator, or dictionary view.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">numbers = [1, 2, 3]\ncopied = list(numbers)\nprint(copied)<\/code><\/pre>\n<\/div>\n<p>For an existing list, <code>numbers.copy()<\/code>, <code>numbers[:]<\/code>, and <code>list(numbers)<\/code> all create a shallow copy.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Shallow_copy_vs_deep_copy\"><\/span>Shallow copy vs deep copy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A shallow copy creates a new outer list, but it keeps references to the same nested objects. This matters for lists of lists.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">matrix = [[1, 2], [3, 4]]\nshallow = matrix.copy()\n\nshallow[0].append(99)\nprint(matrix)\nprint(shallow)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">[[1, 2, 99], [3, 4]]\n[[1, 2, 99], [3, 4]]<\/code><\/pre>\n<\/div>\n<p>The outer list is new, but the first inner list is shared. Mutating that inner list appears in both variables.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Copy_nested_lists_with_deepcopy\"><\/span>Copy nested lists with deepcopy()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Use <code>copy.deepcopy()<\/code> when you need independent nested lists.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">from copy import deepcopy\n\nmatrix = [[1, 2], [3, 4]]\ndeep = deepcopy(matrix)\n\ndeep[0].append(99)\nprint(matrix)\nprint(deep)<\/code><\/pre>\n<\/div>\n<p>Output:<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">[[1, 2], [3, 4]]\n[[1, 2, 99], [3, 4]]<\/code><\/pre>\n<\/div>\n<p><code>deepcopy()<\/code> recursively copies contained objects. It is the right tool for nested mutable data, but it can be slower and may copy more than you need for large object graphs.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Use_list_comprehension_when_changing_values\"><\/span>Use list comprehension when changing values<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you want a transformed list, use a list comprehension instead of copying and then editing each item.<\/p>\n<p>To transform conditionally while preserving or reducing the list length, compare the filter and replacement forms in <a href=\"https:\/\/www.pythonpool.com\/python-list-comprehension-if-else\/\">Python list comprehension with if\/else<\/a>.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">numbers = [1, 2, 3]\nsquares = [number ** 2 for number in numbers]\nprint(squares)<\/code><\/pre>\n<\/div>\n<p>This creates a new list with squared values. The original list is not changed.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-shallow-b121.png\" alt=\"Python Pool infographic showing a new outer list retaining references to nested objects\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Shallow list copy: A new outer list retaining references to nested objects.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Avoid_repeated_nested_list_traps\"><\/span>Avoid repeated nested list traps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The multiplication operator can repeat references to the same nested list. Use a list comprehension when creating independent nested lists.<\/p>\n<div class=\"pythonpool-code-scroll\" style=\"max-width:105%;overflow-x:auto;-webkit-overflow-scrolling:touch;\">\n<pre><code class=\"language-python\">bad_grid = [[0] * 3] * 2\nbad_grid[0][0] = 1\nprint(bad_grid)\n\ngood_grid = [[0] * 3 for _ in range(2)]\ngood_grid[0][0] = 1\nprint(good_grid)<\/code><\/pre>\n<\/div>\n<p>The first grid shares the same inner list twice. The second grid creates a new inner list for each row. For more nested-list examples, see our <a href=\"https:\/\/www.pythonpool.com\/python-2d-list\/\">Python 2D list guide<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Which_method_should_you_use\"><\/span>Which method should you use?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong><code>old.copy()<\/code>:<\/strong> best default for copying a normal list.<\/li>\n<li><strong><code>old[:]<\/code>:<\/strong> fine for shallow copies, especially in slice-heavy code.<\/li>\n<li><strong><code>list(old)<\/code>:<\/strong> useful when the source may be any iterable.<\/li>\n<li><strong><code>deepcopy(old)<\/code>:<\/strong> use for nested mutable data that must be independent.<\/li>\n<li><strong>List comprehension:<\/strong> use when you want to transform values while building a new list.<\/li>\n<\/ul>\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>Using <code>=<\/code> and expecting a copy:<\/strong> assignment creates an alias, not a new list.<\/li>\n<li><strong>Expecting shallow copy to clone nested lists:<\/strong> shallow copy only copies the outer list container.<\/li>\n<li><strong>Using <code>append()<\/code> to copy one list into another:<\/strong> that nests the list. Use <code>extend()<\/code> or a copy method depending on the goal.<\/li>\n<li><strong>Using <code>*<\/code> for nested lists:<\/strong> <code>[[0] * 3] * 2<\/code> repeats the same inner list reference.<\/li>\n<li><strong>Deep copying everything by default:<\/strong> <code>deepcopy()<\/code> is powerful, but unnecessary for simple flat lists.<\/li>\n<\/ul>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-deep-b121.png\" alt=\"Python Pool infographic showing nested graphs, cycles, memoized deepcopy, and ownership checks\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>Deep list copy: Nested graphs, cycles, memoized deepcopy, and ownership checks.<\/figcaption><\/figure>\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>Python 2D list<\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/python-extend-vs-append\/\">append() vs extend() in Python<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/dictionary-to-list-python\/\">Convert dictionary to list in Python<\/a><\/li>\n<li><a href=\"https:\/\/www.pythonpool.com\/unhashable-type-list\/\">Fix TypeError: unhashable type: &#8216;list&#8217;<\/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-range-inclusive\/\">Python range() inclusive<\/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\/tutorial\/datastructures.html#more-on-lists\" rel=\"noopener\">Python tutorial: list methods<\/a><\/li>\n<li><a href=\"https:\/\/docs.python.org\/3\/library\/copy.html\" rel=\"noopener\">Python documentation: copy module<\/a><\/li>\n<li><a href=\"https:\/\/docs.python.org\/3\/library\/stdtypes.html#mutable-sequence-types\" rel=\"noopener\">Python documentation: mutable sequence types<\/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>Use <code>my_list.copy()<\/code> when you need a straightforward shallow copy of a list. Use slicing or <code>list()<\/code> when they fit the surrounding code, and switch to <code>deepcopy()<\/code> only when nested mutable objects must be copied independently.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Recognize_Aliases\"><\/span>Recognize Aliases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If two names point to the same list, append, remove, or item assignment through either name changes the same object. Check identity with is when diagnosing this behavior.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Make_A_Shallow_Copy\"><\/span>Make A Shallow Copy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>list_value.copy(), list(list_value), and list_value[:] create a new outer list. Elements remain shared references, which is correct for immutable elements and sometimes intended for objects with shared ownership.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Handle_Nested_Lists\"><\/span>Handle Nested Lists<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A shallow copy of [[1]] still shares the inner list. Mutating that nested value changes both outer lists, so copy the nested structure only when the data contract requires independent ownership.<\/p>\n<figure class=\"pythonpool-article-visual pythonpool-supporting-visual\"><img src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-ownership-b121.png\" alt=\"Python Pool infographic choosing comprehension, slice, copy, or deepcopy by sharing and performance requirements\" width=\"1536\" height=\"1054\" loading=\"lazy\" decoding=\"async\"><figcaption>List copy ownership: Python Pool infographic choosing comprehension, slice, copy, or deepcopy by sharing and performance requirements.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"Use_Deepcopy_Carefully\"><\/span>Use Deepcopy Carefully<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>copy.deepcopy recursively copies supported objects and tracks cycles, but custom resources, locks, caches, file handles, and large graphs may not have meaningful or efficient deep-copy behavior.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Prefer_Explicit_Construction\"><\/span>Prefer Explicit Construction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For a known schema, a comprehension or constructor can copy exactly the fields needed and avoid copying accidental state. This is often clearer than a blanket deep copy.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Test_Identity_And_Values\"><\/span>Test Identity And Values<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Test empty and nested lists, aliases, immutable elements, shallow changes, deep changes, custom objects, cycles, and performance before selecting the copy strategy.<\/p>\n<p>Use the <a href=\"https:\/\/docs.python.org\/3\/library\/copy.html\">official Python copy documentation<\/a>. Related Python Pool references include <a href=\"2\">Python lists<\/a> and <a href=\"https:\/\/www.pythonpool.com\/python-testing-framework\/\">testing<\/a>.<\/p>\n<p>For related collection semantics, compare <a href=\"2\">list operations<\/a>, <a href=\"1\">nested mappings<\/a>, and <a href=\"https:\/\/www.pythonpool.com\/python-testing-framework\/\">identity tests<\/a> before copying state.<\/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_make_a_shallow_copy_of_a_Python_list\"><\/span>How do I make a shallow copy of a Python list?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Use list_value.copy(), list(list_value), or list_value[:] when an independent outer list with shared element references is the intended result.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"When_should_I_use_deepcopy\"><\/span>When should I use deepcopy?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Use copy.deepcopy when nested mutable objects must also be copied, after considering custom objects, resources, cycles, and the cost of recursive copying.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_did_changing_the_copied_list_change_the_original\"><\/span>Why did changing the copied list change the original?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The variables may reference the same list, or a shallow copy may still share a nested list or dictionary.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_assignment_a_list_copy\"><\/span>Is assignment a list copy?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. Assignment creates another reference to the same list; it does not create a new container.<\/p>\n<p><script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"How do I make a shallow copy of a Python list?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use list_value.copy(), list(list_value), or list_value[:] when an independent outer list with shared element references is the intended result.\"}},{\"@type\":\"Question\",\"name\":\"When should I use deepcopy?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use copy.deepcopy when nested mutable objects must also be copied, after considering custom objects, resources, cycles, and the cost of recursive copying.\"}},{\"@type\":\"Question\",\"name\":\"Why did changing the copied list change the original?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The variables may reference the same list, or a shallow copy may still share a nested list or dictionary.\"}},{\"@type\":\"Question\",\"name\":\"Is assignment a list copy?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. Assignment creates another reference to the same list; it does not create a new container.\"}}]}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.<\/p>\n","protected":false},"author":29,"featured_media":32187,"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":[5090,5092,5087,5093,5086,5088],"class_list":["post-21734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-copy-list-python","tag-deep-copy-list-python","tag-python-copy-list-to-new-list","tag-python-deep-copy-list","tag-python-list-copy","tag-python-make-copy-of-list","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>Copy a List in Python: Slicing, copy(), and deepcopy()<\/title>\n<meta name=\"description\" content=\"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.\" \/>\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-copy-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Copy a List in Python: Slicing, copy(), and deepcopy()\" \/>\n<meta property=\"og:description\" content=\"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-copy-list\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-30T08:32:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-14T14:19:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-b121.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-copy-list-b121.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=\"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-copy-list\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/\"},\"author\":{\"name\":\"Nikhil Omkar\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#\\\/schema\\\/person\\\/6faa89103f0ea990a146386f20d1454f\"},\"headline\":\"Copy a List in Python: Slicing, copy(), and deepcopy()\",\"datePublished\":\"2022-03-30T08:32:52+00:00\",\"dateModified\":\"2026-07-14T14:19:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/\"},\"wordCount\":1072,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/python-copy-list-shallow-deepcopy.png\",\"keywords\":[\"copy list python\",\"deep copy list python\",\"python copy list to new list\",\"python deep copy list\",\"python list copy\",\"python make copy of list\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/\",\"name\":\"Copy a List in Python: Slicing, copy(), and deepcopy()\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/python-copy-list-shallow-deepcopy.png\",\"datePublished\":\"2022-03-30T08:32:52+00:00\",\"dateModified\":\"2026-07-14T14:19:26+00:00\",\"description\":\"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/python-copy-list-shallow-deepcopy.png\",\"contentUrl\":\"https:\\\/\\\/www.pythonpool.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/python-copy-list-shallow-deepcopy.png\",\"width\":1350,\"height\":650,\"caption\":\"Python copy list with list copy slicing and deepcopy for nested lists\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pythonpool.com\\\/python-copy-list\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pythonpool.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Copy a List in Python: Slicing, copy(), and deepcopy()\"}]},{\"@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":"Copy a List in Python: Slicing, copy(), and deepcopy()","description":"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.","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-copy-list\/","og_locale":"en_US","og_type":"article","og_title":"Copy a List in Python: Slicing, copy(), and deepcopy()","og_description":"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.","og_url":"https:\/\/www.pythonpool.com\/python-copy-list\/","og_site_name":"Python Pool","article_published_time":"2022-03-30T08:32:52+00:00","article_modified_time":"2026-07-14T14:19:26+00:00","og_image":[{"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2026\/07\/python-copy-list-b121.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-copy-list-b121.png","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Nikhil Omkar","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/"},"author":{"name":"Nikhil Omkar","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/6faa89103f0ea990a146386f20d1454f"},"headline":"Copy a List in Python: Slicing, copy(), and deepcopy()","datePublished":"2022-03-30T08:32:52+00:00","dateModified":"2026-07-14T14:19:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/"},"wordCount":1072,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/03\/python-copy-list-shallow-deepcopy.png","keywords":["copy list python","deep copy list python","python copy list to new list","python deep copy list","python list copy","python make copy of list"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-copy-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-copy-list\/","url":"https:\/\/www.pythonpool.com\/python-copy-list\/","name":"Copy a List in Python: Slicing, copy(), and deepcopy()","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/03\/python-copy-list-shallow-deepcopy.png","datePublished":"2022-03-30T08:32:52+00:00","dateModified":"2026-07-14T14:19:26+00:00","description":"Copy Python lists safely with slicing, list(), copy(), and deepcopy(), and understand shallow copies, nested mutability, aliases, and performance.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-copy-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/03\/python-copy-list-shallow-deepcopy.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2022\/03\/python-copy-list-shallow-deepcopy.png","width":1350,"height":650,"caption":"Python copy list with list copy slicing and deepcopy for nested lists"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-copy-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Copy a List in Python: Slicing, copy(), and deepcopy()"}]},{"@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\/21734","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=21734"}],"version-history":[{"count":68,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/21734\/revisions"}],"predecessor-version":[{"id":42054,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/21734\/revisions\/42054"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/32187"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=21734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=21734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=21734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}