title: The int function and its parameters
body: <p>I'm working on <a href="https://github.com/zhiwehu/Python-programming-exercises/blob/master/100%2B%20Python%20challenging%20programming%20exercises.txt" rel="nofollow">this series of problems</a>.</p>
  
  <p>I do not understand question 11 and the way <code>int()</code> is being used. I understand that converting <code>x</code> directly into an <code>int</code> causes the loss of some zeroes so doing that was out of the question but I'm not understanding what </p>
  
  <pre><code>intp = int(p,2) 
  </code></pre>
  
  <p>is suppose to be doing. Printing out <code>intp</code> I get the following values, <code>4,3,10,9</code>. How is that at all related to <code>0100,0011,1010,1001</code>? Also why are zeros lost in the first place?</p>
  
  <p>Question 11<br>
  Level 2</p>
  
  <blockquote>
    <p>Question: Write a program which accepts a sequence of comma separated
    4 digit binary numbers as its input and then check whether they are
    divisible by 5 or not. The numbers that are divisible by 5 are to be
    printed in a comma separated sequence.</p>
    
    <p>Example:</p>
  
  <pre><code>0100,0011,1010,1001
  </code></pre>
    
    <p>Then the output should be:</p>
  
  <pre><code>1010
  </code></pre>
    
    <p>Notes: Assume the data is input by console.</p>
    
    <p>Hints: In case of input data being supplied to the question, it should
    be assumed to be a console input.</p>
  </blockquote>
  
  <pre><code>value = []
  items=[x for x in raw_input().split(',')]
  for p in items:
      print p
      intp = int(p, 2)
      print intp
      if not intp%5:
          value.append(p)
  
  print ','.join(value)
  </code></pre>