March 2003
Intermediate to advanced
656 pages
39h 30m
English
find
s.find(sub,start=0,end=sys.maxint)Returns the lowest index in s where
substring sub is found, such that
sub is entirely contained in
s
[
start:end
].
For example, 'banana'.find('na') is
2, as is 'banana'.find('na',1),
while 'banana'.find('na',3) is
4, as is
'banana'.find('na',-2). find
returns -1 if sub is
not found.
Read now
Unlock full access