def single_line(text):
 return re.sub(' +', ' ', normalize_newlines(text).replace('\n', '')).strip()

def single_line ( text ) : return re . sub ( ' +' , ' ' , normalize_newlines ( text ) . replace ( '\n' , '' ) ) . strip ( )
quick utility to make comparing template output easier .