1>>> shepherd = "Mary"
2>>> age = 32
3>>> stuff_in_string = "Shepherd {} is {} years old.".format(shepherd, age)
4>>> print(stuff_in_string)
5Shepherd Mary is 32 years old.
6
1def insert (source_str, insert_str, pos):
2 return source_str[:pos]+insert_str+source_str[pos:]
1>>> line = 'Kong Panda'
2>>> index = line.find('Panda')
3>>> output_line = line[:index] + 'Fu ' + line[index:]
4>>> output_line
5'Kong Fu Panda'