x = "Where am I?" n = x.find("am") xnew = x[0:n]+"are"+x[n+2:] print xnew