title: Elegant way to convert list to hex string
body: <p>I have a long list that looks like this:</p>
  
  <pre><code>[True, True, True, False, ... ]
  </code></pre>
  
  <p>Representing walls in a tile map. It isn't guaranteed to be a multiple of 4 long, but it doesn't matter if it gets padded at the end.</p>
  
  <p>I'd like to convert this into a hex string, so for the above example it would start with E ...</p>
  
  <p>I was hoping there was a nice elegant way to do this (using Python 2.7.3)!</p>
  
  <p>Thanks.</p>
  
  <p>EDITED</p>
  
  <p>This is an example of a 9x9 map:</p>
  
  <pre><code>map = [True, True, True, True,
         True, True, True, True, 
         True, True, True, True, 
         True, False, False, True, 
         True, True, True, True, 
         True, False, False, False, 
         False, True, True, True, 
         True, True, False, False, 
         False, False, True, True, 
         True, True, True, True, 
         False, False, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True, True, True, True, 
         True]# False, False, False padded
  </code></pre>
  
  <p>what I would like is to be able to</p>
  
  <pre><code>str = heximify(map)
  print str
  &gt; FFF9F87C3F3FFFFFFFFF8
  </code></pre>