nl: a string '%s_%s', where '%s' is replaced with tablename and f.name, respectively, return value of the function qn called with an argument tablename and return value of the function qn called with an argument f.name. join field_output elements into a string, separated by whitespaces, append it to table_output.
code: table_output . append ( " " . join ( field_output ) )