title: Simple IF statement in Python 2.7
body: <p>I need help with the <code>if</code> statement.The syntax seems to be correct and have verified within this forum as well but not sure why is it going inside the "invalid IF statement".</p>
  
  <pre><code>ips=['20.34.178.250']
  for index, item in enumerate(ips):
      flag1 = 0
      host_bytes= item.split('.')
      print item,index
      for index1, item1 in enumerate(host_bytes):
          print item1
          if [item1 &gt; 255 and flag1==0]:
              print "IP Address is invalid",item1,flag1
              flag1=1
  print flag1
  </code></pre>
  
  <p>Output :</p>
  
  <pre><code>20.34.178.250 0
  20
  IP Address is invalid 20 0
  34
  IP Address is invalid 34 1
  178
  IP Address is invalid 178 1
  250
  IP Address is invalid 250 1
  1
  </code></pre>