How can I declare a bit array of a very large size, say 6 million bits?
from bitarray import bitarray a = bitarray(2**20)
You can check out more info about this module at http://pypi.python.org/pypi/bitarray/