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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -