Python String Functions Replace Lost