<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_prtfmt_list(self, flds, add_nl=True):
 """Get print format, given fields."""

        fmts = []
        for fld in flds:
            if fld[:2] == 'p_':
                fmts.append('{{{FLD}:8.2e}}'.format(FLD=fld))
            elif fld in self.default_fld2fmt:
                fmts.append(self.default_fld2fmt[fld])
            else:
                raise Exception("UNKNOWN FORMAT: {FLD}".format(FLD=fld))
        if add_nl:
            fmts.append("\n")
        return fmts