>>> line = 'Kong Panda' >>> index = line.find('Panda') >>> output_line = line[:index] + 'Fu ' + line[index:] >>> output_line 'Kong Fu Panda'