I think the way you are testing for the newline character might be causing you problems. I tried the following in the Python command window:
x = "National Resources\nPlan\nBase"
if x == "National Resources\nPlan\nBase": x = "Natural
Resources\nPlan\nBase"
print x
and this is what printed: Natural ResourcesPlanBase Python uses the backslash for special characters like the newline character \n. You might want to put a print line inside of your if statement to see if the condition is true. You can also try expressions in the command window to see how they evaluate like I did.
Jeff Ward
Summit County, Utah