什么是php附加到python中的字符串的等效项

I am migrating php code into Python. My data is saved in queryResults variable. And looks like this:

OrderedDict([('totalSize', 44), ('done', True), ('records', [OrderedDict([('attributes', OrderedDict([('type', 'Opportunity'), ('url', '/services/data/v42.0/sobjects/Opportunity/0060z0000226XdJAAU')]))

As far as I understood the following php code creates an empty variable - output and appends the queryResults records in output variable. Then it parsed it with parse_csv function.

$output = "";

foreach ($queryResults as $line => $row) {
  $output .= $row;
}

$arr = parse_csv($output);
$newarr = array();
$keys = array();
$cnt = 0;

我将如何使用Python做同样的事情?我试过了:

output = ""

for item in queryResults:
    output.append(item)
print(output)

Error message is: AttributeError: 'str' object has no attribute 'append'