def bitlist_to_string(data):
 result = []
 pos = 0
 c = 0
 while (pos < len(data)):
  c += (data[pos] << (7 - (pos % 8)))
  if ((pos % 8) == 7):
   result.append(c)
   c = 0
  pos += 1
 return ''.join([chr(c) for c in result])

def bitlist_to_string ( data ) : result = [ ] pos = 0 c = 0 while ( pos < len ( data ) ) : c += ( data [ pos ] << ( 7 - ( pos % 8 ) ) ) if ( ( pos % 8 ) == 7 ) : result . append ( c ) c = 0 pos += 1 return '' . join ( [ chr ( c ) for c in result ] )
transform from bit list to ascii string .