Please explain how Python evaluates this string so that one word can be set with a value greater than another word in the string? How is b > n.
def not_bad(s):
n = s.find('not')
b = s.find('bad')
if n != -1 and b != -1 and b > n:
s = s[:n] + 'good' + s[b+3:]
return s