On Sun, 8 Jan 2017 08:40 am, CM wrote:

> So what's going on here? Why isn't a string with the content 'match' equal
> to another string with the content 'match'?

You don't know that the content is 'match'. All you know is that when
printed, it *looks like* 'match'.

Hint:

s = 'match '
print 'match', s  # they look the same
print 'match' == s  # but they aren't the same


Start by printing repr(candidate_text) and see what you really have.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to