Nov-03-2019, 11:30 PM
its not working because, find() method returns the lowest index of the substring if it is found in given string. If its is not found then it returns -1.
>>> x='012345horwitz678910' >>> x.find('horwitz') 6 >>> x.find('XXX') -1 >>> 'horwitz' in x True >>>