I have a list of binary number, its about 100 elements in a list:
a='11010010'
n = 2
split=[a[i:i+n] for i in range(0, len(a), n)]
The result showing like this:
split =['11', '01', '00', '10', '01', '10', '11'.....]
My question is how to assign if else looping for my list? The problem is the list need to updated automatically based on the value of the elements.
For example, if '11'=3*2, '01'=7*4, '00'=5*6, '10'=4*8
And I want my result updated to this:
split =[6,28,30,32,28,32, 6 .....]
Thanks a lot! ;)
a="11010010"? And what isencode?