Home
Python Tutorial
Introduction
Data Type
Statement
Operator
String
Tuple
List
Dictionary
Collections
Function
Class
File
Buildin Function
Buildin Module
Database
Regular Expressions
Thread
Tkinker
wxPython
XML
Network
CGI Web
Windows
Menu
Compare String « String « Python Tutorial
Python Tutorial
String
Compare String
5.4.Compare String
5.4.1.
Strings are compared according to their order when sorted alphabetically:
5.4.2.
To ignore the difference between uppercase and lowercase letters, use the string methods upper or lower
5.4.3.
Case Sensitive Compare
5.4.4.
Case In-Sensitive Compare
5.4.5.
Compare string demo
5.4.6.
cmp() function performs a lexicographic (ASCII value-based) comparison for strings.