how to compare two strings?
Paul Rubin
phr-n2002a at nightsong.com
Tue Feb 12 04:38:39 EST 2002
More information about the Python-list mailing list
Tue Feb 12 04:38:39 EST 2002
- Previous message (by thread): how to compare two strings?
- Next message (by thread): Shell command
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
martin at v.loewis.de (Martin v. Loewis) writes: > Can you specify "alphabetically" more precisely? Do you mean > "lexicographically, by character ordinal value" (which is what your > scmp code suggests)? If so, the builtin cmp() function will do; > it compares strings just fine. I meant exactly the same function that the sort method uses by default. Yes it looks like cmp was what I wanted--I just didn't find it in the obvious places in the docs (under the sort method or under string services or string methods). Thanks.
- Previous message (by thread): how to compare two strings?
- Next message (by thread): Shell command
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list