def get_comment_header(line):
 m = re.match('^([ \\t]*#*)', line)
 if (m is None):
  return ''
 return m.group(1)

def get_comment_header ( line ) : m = re . match ( '^([ \\t]*#*)' , line ) if ( m is None ) : return '' return m . group ( 1 )
return string with leading whitespace and # from line or .