On 4/29/2012 6:05 AM, Terry Reedy wrote:
On 4/29/2012 3:59 AM, J. Mwebaze wrote:
I am just wondering which specific algorithm does python use to compare
two strings.

'Python' does not use algorithms, implementations do. CPython may check
id and or hash before doing a character-by-char comparison (or perhaps
multiple chars at a time).

I think all the sequence comparisons check for equality of len() before doing item by item comparison.


--
Terry Jan Reedy

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

Reply via email to