你能告诉我这段代码有什么问题吗?
def insert_sequence(str1, str2, index):
'''The first two parameters are DNA sequences and the third parameter
is an index. Return the DNA sequence obtained by inserting the second
DNA sequence into the first DNA sequence at the given index.
>>>insert_sequence('CCGG', 'AT',2)
CCATGG
'''
str1 = str1[0:index] + str2 + str1[index:len(str1)]
return str1