Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 18th, 2012  |  syntax: Python  |  size: 0.22 KB  |  views: 48  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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()
clone this paste RAW Paste Data