How to create new variable from For Loop results I need to get a list of all the "sizes" from my Table type field column. The list of sizes needs to be separated by a "|"... eg: small|medium|large

My Table type field name is "productAttributes" and the column in that field is "size".

How can I string together the results of a For Each loop to create a new variable with Twig?
If I understood your question correctly then you should be able to do it as follows:

{% set sizes = [] %}

{% for productAttribute in entry.productAttributes %}
    {% set sizes = sizes|merge([productAttribute.size]) %}
{% endfor %}

{% set sizes = sizes|join('|') %}


The sizes variable will then be a string containing the pipeline separated sizes, for example:

small|medium|large