Skip to content

Instantly share code, notes, and snippets.

@mastro35 mastro35/ Secret
Created Apr 16, 2018

What would you like to do?
import time
def get_elements():
elements = []
for i in range (0,10000):
# return a list of 10.000 items, each of 10KB...
return elements
characters_count = 0
# in this moment, our program has a memory footprint of more than 100MB!!!
for i in my_elements:
characters_count = characters_count + len(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.