s1 = 'The theory of data science is of the utmost importance.' s2 = 'practice' print('The new sentence: {}'.format(s1.replace('theory', s2))) # Ouput # The new sentence: The practice of data science is of the utmost importance.