0

I am trying to create a list of tuples and I am getting Invalid Syntax:

def match_enzymes(strand, enzymes, sequences):
'''(str, list of str, list of str) -> list of (str, list of int) tuples

Return a list of tuples where the first item of each tuple is the name of a restriction enzyme and the second item is the list of indices of the restriction sites that the enzyme cuts.

>>>
>>>
>>>
'''

list_of_tuples = []

for i in range(len(enzymes)):
    list_of_tuples.append((enzymes[i], restriction_sites(strand, sequence[i]))

return list_of_tuples
Cœur
  • 37,241
  • 25
  • 195
  • 267
AMVGod Z
  • 31
  • 1
  • 1
  • 3

1 Answers1

0

two problems:

1) you are missing the closing parentheses in:

 list_of_tuples.append((enzymes[i], restriction_sites(strand, sequence[i])) #<--!!! 

2) your code is not indented currently

Yoav Glazner
  • 7,936
  • 1
  • 19
  • 36