def format_alignment(align1, align2, score, begin, end):
 s = []
 s.append(('%s\n' % align1))
 s.append(('%s%s\n' % ((' ' * begin), ('|' * (end - begin)))))
 s.append(('%s\n' % align2))
 s.append(('  Score=%g\n' % score))
 return ''.join(s)

def format_alignment ( align1 , align2 , score , begin , end ) : s = [ ] s . append ( ( '%s\n' % align1 ) ) s . append ( ( '%s%s\n' % ( ( ' ' * begin ) , ( '|' * ( end - begin ) ) ) ) ) s . append ( ( '%s\n' % align2 ) ) s . append ( ( '  Score=%g\n' % score ) ) return '' . join ( s )
format_alignment -> string format the alignment prettily into a string .