title: removing the first 0 bit value
body: <p>i want to get the binary value from a string, but why if i print the binary value and save it into an array there is always 0 bit get inserted automatically, i know that its from the bitwise operation inside the loop, how can i delete it and get the actual binary value from a string?</p>
  
  <p>this is the code </p>
  
  <pre><code>def padding():
      a = "Testing"
      byte_a = a.encode('utf-8')
  
      print(byte_a)
  
      print(bin(byte_a[0]))
      print(bin(byte_a[1]))
      print(bin(byte_a[2]))
  
      i = 0
      x = []
  
  
      #byte_a.append(1)
  
      while True:
          x.insert(i, ((byte_a[i//8]&gt;&gt;(7-(i%8)))&amp;1))
          print(x)
  
  
          i+=1
  </code></pre>
  
  <p>and here is the output:</p>
  
  <pre><code>b'Testing'
  0b1010100
  0b1100101
  0b1110011
  [0]
  [0, 1]
  [0, 1, 0]
  [0, 1, 0, 1]
  [0, 1, 0, 1, 0]
  [0, 1, 0, 1, 0, 1]
  [0, 1, 0, 1, 0, 1, 0]
  [0, 1, 0, 1, 0, 1, 0, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0]
  [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1]
  ...
  
  </code></pre>
  
  <p>as you can see the array had the first value of 0 for every binary.</p>
  
  <p>thanks guys</p>