title: maximum number of consecutive 's in the binary for a given wrong
body: <p>Whats wrong in my code</p>
  
  <pre><code>import sys
  
  x=0
  y=[]
  n = bin(int(input()))
  for i in n:
      if i == 1:
          x +=1
      else:
          y.append(x)
          x=0
  y.append(x)
  print(max(y))
  </code></pre>
  
  <p>Output </p>
  
  <pre><code>5
  0b101    
  0
  </code></pre>
  
  <p>Expected Output</p>
  
  <pre><code>5
  0b101
  1
  </code></pre>
  
  <p>(Consecutive Ones in the binary for given decimal)</p>