Advertisement
sayaneshome

Untitled

Feb 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import csv
  2. import random
  3.  
  4.  
  5. with open('karyotype.zeamays1.txt', 'r') as f:
  6. reader = csv.reader(f,delimiter='\t')
  7. see=open('output.txt','w')
  8. for row in reader:
  9. lines=[]
  10. colors=open("colours_bar.txt","r")
  11. lines=colors.read().split()
  12. color_me=random.choice(lines)
  13. row.append(color_me)
  14. see.write("%s\n" % row)
  15. see.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement