python - SyntaxError while defining and calling a function -


I am told:

Write a function named start_codon Which accepts a DNA sequence as its logic and gives the first coding as a string.

Here's what I've done so far:

  #! / Usr / bin / python def start_codon (DNA): codon1 = dna [0: 3] Codonstring = codon1.split (","); However, when I try the function and press enter to call, I get a syntax error:  
  file "& lt; stdin & gt;", line 1 print (start_codon ("ATGGAACACAACGTCAGTGACTTCGTCAG"))  

You are distorted by either quotation marks " ... " or apostrophes '...' :

  should use print (start_codon ("ATGGAACACAACGTCAGTGACTTCGTCAG")) # or print (start_codon ('ATGG AACCAACGTCAGTGACTTCGTCAG '))  

" and " are special characters that are not recognized by Python.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -