temp_str = 'this is a test' print(temp_str.replace('is','IS') print(temp_str) #################### Result ########################### thIS IS a test this is a test