My code:
for x in remove_zeros:
if x == remove_zeros[-1]:
x = '0' + x
else:
x = '1' + x
For some reason this does not do anything to the variables. I've looked up how to fix this, and nothing works at all. Basically, I'm detecting if an element in a list is the last element or not, and then if it is, I'm either adding a 0 or a 1 in front of it. I cannot figure out how to make this work.