0

このコードの何が問題なのか教えてください。

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
4

2 に答える 2