claire morandin wrote:
> Thanks Peter, true I did not realize that ercc_contigs is empty, but I am
> not sure how to "populate" the dictionary if I only have one column for
> the value but no key
You could use a "dummy value"
ercc_contigs = {}
for line in open('Faq_ERCC_contigs_name.txt'):
gene = line.split()[0]
ercc_contigs[gene] = None
but a better approach is to use a set instead of a dict:
ercc_contigs = set()
for line in open('Faq_ERCC_contigs_name.txt'):
gene = line.split()[0]
ercc_contigs.add(gene)
--
http://mail.python.org/mailman/listinfo/python-list