SHARE
TWEET

Untitled

a guest Oct 18th, 2012 52 Never
  1. trans = {'A':'T','T':'A','C':'G','G':'C'}
  2. mystring="ATTGCA"
  3. with open("data1.txt", "w+") as outfile:
  4.     for character in mystring:
  5.         outfile.write(trans[character])
  6.     outfile.seek(0)
  7.     print outfile.read()
RAW Paste Data
Top