notebook.community
Edit and run
just paste a range here (if it is rectangular, the concatenation happens first along the rows)
In [1]: cells = """ 1 2 3 4 1 2 3 4 1 2 3 4 """
cells = """ 1 2 3 4 1 2 3 4 1 2 3 4 """
In [2]: import re ", ".join(re.split("\n|\t", cells.strip()))
import re ", ".join(re.split("\n|\t", cells.strip()))
Out[2]: '1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4'
'1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4'