The find method finds a substring within a larger string. : Find : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Find »

 

The find method finds a substring within a larger string.


# It returns the leftmost index where the substring is found. If it is not found, ?is returned: 

print 'With a moo-moo here, and a moo-moo there'.find('moo')
title = "A B C D"

print title.find('A')
print title.find('B')
print title.find('D')
print title.find('E')



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Find