Cognizant Interview Question

Replace characters in a string in python.