Created
July 24, 2014 19:22
-
-
Save anonymous/d2c56a7d19b371d32c28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> f = open("bla","w") | |
>>> GO_list = {'Seq_A': ['GO:1234', 'GO:2345', 'GO:3456'], | |
... 'Seq_B': ['GO:7777', 'GO:8888']} | |
>>> looked_up_go = csv.writer(f) | |
>>> for key, val in GO_list.iteritems(): | |
... looked_up_go.writerow([key] + val) | |
... | |
>>> f.close() | |
>>> print open("bla").read() | |
Seq_A,GO:1234,GO:2345,GO:3456 | |
Seq_B,GO:7777,GO:8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment