title: How can I check the memory usage of objects in iPython?
body: <p>I am using iPython to run my code. I wonder if there is any module or command which would allow me to check the memory usage of an object. For instance:</p>
  
  <pre><code>In [1]: a = range(10000)
  In [2]: %memusage a
  Out[2]: 1MB
  </code></pre>
  
  <p>Something like <code>%memusage &lt;object&gt;</code> and return the memory used by the object.</p>
  
  <p><strong>Duplicate</strong></p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/33978/find-out-how-much-memory-is-being-used-by-an-object-in-python">Find out how much memory is being used by an object in Python</a></p>
  </blockquote>