Contrived example, for brevity:
awk 'BEGIN { while (i < 10) print i++ }' | paste -sd, -
ls *txt | paste -sd, -
printf "1\n2\n3" | paste -sd+ | bc 6
It's fascinating that there are so many different ways to do things, even within the limited confines of coreutils!
seq 10 | paste -sd, -
Contrived example, for brevity:
or maybe: