Skip to content Skip to sidebar Skip to footer

Identical String Return False With '==' In Python, Why?

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 w

Solution 1:

Can't reproduce your problem. To debug it, print or log the repr() of data and action: this will likely show you the cause (probably some non-visible binary byte has snuck into data, based on how you obtained it [[which you don't show us]] and hence into action).


Post a Comment for "Identical String Return False With '==' In Python, Why?"