def read_amino_acid_sequence(path):
    with open(path) as sequence_file:
        title = sequence_file.readline()
aminoacid_sequence = sequence_file.read()
title = title.strip()
aminoacid_sequence = aminoacid_sequence.replace(' ', '').replace('\n', '')
return title, aminoacid_sequence
Регулярное выражение Python, соответствующее многострочному блоку текста