Sunday, 15 September 2013

“Indentation Error: unindent does not match any outer indentationlevel”

"Indentation Error: unindent does not match any outer indentation level"

can you please tell me what is wrong with this code?
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

No comments:

Post a Comment