---
title: "Discussion on \"Python trick - How to make lists not share the same memory location\" | Hashnode"
description: "Discussion on \"Python trick - How to make lists not share the same memory location\". You need to copy the original L2 list as L1 list and save it.\nBut, you don’t want the L1 list to change when the L2 list changes.\nDoing this as follows will change the members in both lists, because lists L1 and L2 share the same memory location:\nL2 ..."
url: "https://hashnode.com/posts/python-trick-how-to-make-lists-not-share-the-same-memory-location/655f29c905e17e81d2284938"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Python trick - How to make lists not share the same memory location](https://bulog.hashnode.dev/python-trick-how-to-make-lists-not-share-the-same-memory-location?utm_source=hashnode&utm_medium=feed)

You need to copy the original L2 list as L1 list and save it. But, you don’t want the L1 list to change when the L2 list changes. Doing this as follows will change the members in both lists, because lists L1 and L2 share the same memory location: L2 ...

Nov 23, 2023 · 4 min read · bulog.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python-lists](https://hashnode.com/tag/python-lists)
-   [#python-list](https://hashnode.com/tag/python-list)

## Written by

[Miodrag Golubović](https://hashnode.com/@Bulog)

@Bulog · Lazarevac, Serbia

  
[View profile](https://hashnode.com/@Bulog)

Python forever

Electrical engineer. He programs in several programming languages. Python because it's relatively lightweight, calculates with very large numbers, has great support and tons of pre-built stuff that you just need to include in your program.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
