Last active
March 24, 2022 11:30
-
-
Save deven96/982ee63cf1ced56e5d7a9f861c81219c to your computer and use it in GitHub Desktop.
Deleting large array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from memory_profiler import profile | |
@profile | |
def my_func(): | |
a = [1] * (10 ** 6) | |
b = [2] * (2 * 10 ** 7) | |
c = b[200000] | |
del b | |
return a.append(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment