You should probably either put the replace method on the same line as the original statement, or choose different variable names for the two assignments. It's generally better practice not to overwrite a variable in place :)