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
convert all names to lowercase both when storing and searching : lower « String « Python Tutorial
Python Tutorial
String
lower
name =
'Gumby'
names = [
'gumby'
,
'smith'
,
'jones'
]
if
name.lower() in names: print
'Found it!'
5.16.lower
5.16.1.
The lower method returns a lowercase version of the string
5.16.2.
convert all names to lowercase both when storing and searching