I\'ve created a method to convert an int to a bitfield (in a list) and it works, but I\'m sure there is more elegant solution- I\'ve just been staring at it for to
int
Array with fixed length:
>>> '{0:07b}'.format(12) '0001100'
Do you believe string is also an array? No? See:
>>> [int(x) for x in '{0:07b}'.format(12)] [0, 0, 0, 1, 1, 0, 0]