title: Counting bits over each position in multiple files
body: <pre><code>for z in range(1,n+1):
      with open("file_{}.bin".format(z), "rb") as file:
          for byte in file:
              for bit in byte: 
                  if bit=='0':
                      s0+=1
                  else:
                      s1+=1 
          break
  </code></pre>
  
  <p>I used the break to stop the loop <code>for byte in file:</code> to read the same position on the next file and increment it but it returns just for one loop</p>
  
  <p>I want to count number of 0 for every single position on multiple files, 
  Example : </p>
  
  <p>file_0.bin contains</p>
  
  <pre><code>10110000
  </code></pre>
  
  <p>file_1.bin contains</p>
  
  <pre><code>11101010
  </code></pre>
  
  <p>The output for position 0 will be : 0</p>
  
  <p>The output for position 1 will be : 1</p>
  
  <p>.</p>
  
  <p>.</p>
  
  <p>The output for position 7 will be : 2</p>
  
  <p>Any ideas?
  Thanks in advance</p>