I have an integer list that is supposed to represent binary:
x = [1, 0, 1, 1, 0, 0, 0, 0]
y = ''.join(x[:4])
I can't seem to join it, I get 'sequence item 0: expected str instance, int found'
However if I do
x = [str(1), str(0), str(1), str(1), str(0), str(0), str(0), str(0)]
y = ''.join(x[:4])
I get 'type error int object is not subscriptable' however I am not trying to to access ints.
Anyone know whats going on?