Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

String Comparison Operations

The standard comparisons (<, <=, >, >=, ==, !=) apply to strings. These comparisons use the standard character-by-character comparison rules for ASCII or Unicode.

There are two additional comparisons: in and not in . These check to see if a single character string occurs in a longer string. The in operator returns a True when the character is found, False if the character is not found. The not in operator returns True if the character is not found.

>>> 
"a" in 'xyxxyabcxyzzy'

True
            

 
 
  Published under the terms of the Open Publication License Design by Interspire