How to check for single character change in a string?
tinnews at isbd.co.uk
tinnews at isbd.co.uk
Sat Dec 24 10:26:21 EST 2011
More information about the Python-list mailing list
Sat Dec 24 10:26:21 EST 2011
- Previous message (by thread): [ANN] pyspread 0.2.0
- Next message (by thread): How to check for single character change in a string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can anyone suggest a simple/easy way to count how many characters have
changed in a string?
E.g. giving results as follows:-
abcdefg abcdefh 1
abcdefg abcdekk 2
abcdefg gfedcba 6
Note that position is significant, a character in a different position
should not count as a match.
Is there any simpler/neater way than just a for loop running through
both strings and counting non-matching characters?
--
Chris Green
- Previous message (by thread): [ANN] pyspread 0.2.0
- Next message (by thread): How to check for single character change in a string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list