Quote:How do you attach or send a file here? I cant seem to find it in here [Image: huh.png]
I posted only the function which is supposed to do the job.
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import pprint def get_data(f): data = f.read().split() ecoli = dict() e_name = None for row in data: if row.startswith(">"): e_name = row.strip(">") ecoli[e_name] = "" else: ecoli[e_name] = "{}{}".format(ecoli[e_name], row) return ecoli def main(): with open("ecoli.txt") as in_file: pprint.pprint(get_data(in_file)) if __name__ == '__main__': sys.exit(main())Try @Larz60's solution first. He is a real programmer. I code for fun. :surfing: