On 3/6/07, zannah marsh <[EMAIL PROTECTED]> wrote:

>         if item == item in word2: #checks characters against each other

Here's the error.

Loop variable "item" contains the actual character in word1. The
syntax "item in word2" checks if this character is _anywhere_ in
word2. What you want to do is rewriting this loop so it checks
character per character. Since it's for homework, I don't want to ruin
your grades by giving you a solution. Try it yourself first.

To see what I mean, try running getDiff("abcd", "dcba").


-- 
- Rikard.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to