How to remove comma from a result set in a macro


I have a question regarding a macro in dbt.

The below statement returns an array with comma separated values. e.g. (‘a’,‘b’,‘c’). But when the sql returns only one value, it gives the result as (‘a’,). If this is the known issue to you, please help on how to remove the comma when the single values are returned.

{%- set results = run_query(sql).columns[0].values() -%}
{% do log(results, info=True) %}


does {% do log(results| trim(‘,’), info=True) %}