1
2def addChar(text,char,place):
3 return text[:place] + char + text[place:]
4
1>>> shepherd = "Martha"
2>>> age = 34
3>>> # Note f before first quote of string
4>>> stuff_in_string = f"Shepherd {shepherd} is {age} years old."
5>>> print(stuff_in_string)
6Shepherd Martha is 34 years old.
7
1>>> line = 'Kong Panda'
2>>> index = line.find('Panda')
3>>> output_line = line[:index] + 'Fu ' + line[index:]
4>>> output_line
5'Kong Fu Panda'