Replace String Using Dict Python Function Return