title: How come retrieving an element from a list is O(1)
body: <p>Today in class, we learned that retrieving an element from a list is O(1) in python. Why is this the case? Suppose I have a list of 4 items, i.e: </p>
  
  <pre><code>li=["perry", 1, 23.5, "s"]
  </code></pre>
  
  <p>These items have different sizes in memory. And so it is not possible to take the memory location of <code>li[0]</code>, and add 3 times the size of each element to get the memory location of <code>li[3]</code>. So how does the interpreter know where <code>li[3]</code> is without having to traverse the list in search of it? </p>