小编use*_*019的帖子

"缩进错误:unindent与任何外部缩进级别都不匹配"

你能告诉我这段代码有什么问题吗?

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
Run Code Online (Sandbox Code Playgroud)

python

0
推荐指数
1
解决办法
270
查看次数

标签 统计

python ×1