title: Identical string return FALSE with '==' in Python, why?
body: <p>The data string is receive through a socket connexion. When receiving the first example where action variable would = 'IDENTIFY', it works.  But when receiving the second example where action variable would = 'MSG' it does not compare.</p>
  
  <p>And the most bizarre thing, when I use Telnet instead of my socket client both are being compare successfully.  But the string are the same...  Is there a possibility that the string are not encode in the same way?  How can I know?</p>
  
  <p>data example:</p>
  
  <pre><code>data = 'IDENTIFY 54143'
  or
  data = 'MSG allo'
  
  action = data.partition(' ')[0]
  if action == "MSG":
      self.sendMessage(data)
  elif action == "IDENTIFY":  
      self.sendIdentify(data)
  else:
      print "false"
  </code></pre>