• + 1 comment

    s = "".join(list(chain.from_iterable(zip(*matrix)))) print(re.sub(r"\b\W+\b", " ", s))