Name: Anonymous 2011-07-27 6:13
def find(str, ch, start=0):
index = start
while index < len(str):
if str[index] == ch:
return index
index = index + 1
return -1Add a fourth parameter, end, that specifies where to stop looking. The default value of end should be len(str).