Last active
June 10, 2021 01:48
-
-
Save rajmayank/95211121a2a2f7475a268a4c5b8a4616 to your computer and use it in GitHub Desktop.
Python-Generators-Memory-Footprint
This file contains 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
items1 = ["Item #1", "item #2",] | |
items2 = ["Item #1", "item #2","Item #4", "item #5",] | |
items3 = ["Item #1", "item #2","Item #4", "item #5", "item#6", "item#7",] | |
sys.getsizeof(items1) # 72 bytes | |
sys.getsizeof(items2) # 120 bytes | |
sys.getsizeof(items3) # 152 bytes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment