Commit 018747ea authored by Blaise Li's avatar Blaise Li
Browse files

Use tuple of fields for namedtuple.

Also removed invisible spaces.
parent 3c6e4cbb
Pipeline #58851 passed with stages
in 13 seconds
from collections import namedtuple
from collections import namedtuple
Sequence = namedtuple("Sequence", "id comment sequence")
Sequence = namedtuple("Sequence", ("id", "comment", "sequence"))
def fasta_reader(fasta_path):
"""
......@@ -20,4 +20,4 @@ def fasta_reader(fasta_path):
comment = ' '.join(header[1:])
else:
sequence += line.strip()
return Sequence(id_, comment, sequence)
\ No newline at end of file
return Sequence(id_, comment, sequence)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment