title: Building a list with binary numbers in binary representation in Python
body: <p>I have a very big list of 0's and 1's that are represented as integers - by default - by python, I think: <code>[randint(0, 1) for i in range(50*98)]</code></p>
  
  <p>And I want to optimize the code so that it utilizes much less memory. The obvious way is to use just 1 bit to represent each of these numbers.</p>
  
  <p>Is it possible to build a list of <strong>real</strong> binary numbers in python?</p>
  
  <p>Regards,
  Bruno</p>
  
  <p><strong>EDIT</strong>: Thank you all.<br>
  From the answers I found out Python doesn't do this by default, so I found this library (that is installed by Macports on OSX so it saves me some trouble) that does bit operations:
  <a href="http://code.google.com/p/python-bitstring/wiki/Examples" rel="nofollow">python-bitstring</a></p>