title: Extract first 20 bytes in a binary header
body: <p>I'm trying to learn how to do this in Python, play'd arround with the psuedo code bellow but couln't come up with anything worth a penny</p>
  
  <pre><code>with open(file, "rb") as f:
      byte = f.read(20) # read the first 20 bytes?
      while byte != "":
          print f.read(1)
  </code></pre>
  
  <p>In the end I'd like to end up with a code capable of the following: <a href="https://stackoverflow.com/a/2538034/2080223">https://stackoverflow.com/a/2538034/2080223</a></p>
  
  <p>But I'm ofcourse interested in learning how to get there so any pointers would be much apphriciated!</p>