1 Replies - 179 Views - Last Post: 29 April 2013 - 11:21 AM Rate Topic: -----

#1 Deaven  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 27-April 13

Python Variable Assignment Gone Wonky

Posted 29 April 2013 - 11:18 AM

Hey guys,

I am trying to make a program that takes DNA sequences and converts them to mRNA and then to amino acid sequences.

Python has no problem with variable assignments thus far accept of this line (the first = )

CCU=CCC-CCA=CCG=P='Proline'



does Python already have a designation for CCU ? If so how would I get around this?

Sorry the typo is in this post only

Is This A Good Question/Topic? 0
  • +

Replies To: Python Variable Assignment Gone Wonky

#2 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7304
  • View blog
  • Posts: 12,161
  • Joined: 19-March 11

Re: Python Variable Assignment Gone Wonky

Posted 29 April 2013 - 11:21 AM

CCC-CCA cannot appear on the left side of an assignment. Assuming CCC and CCA have values, then

CCU = CCC-CCA 



is fine and

CCU=CCC=CCG=P='Proline'


is always okay.

CCC-CCA = CCG 
 

is never okay.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1