You are viewing a single comment's thread. Return to all comments →
First, the strip() in the input line just messes things up by confusing the zip(), so I took that out; then, after the append() loop, I did this:
strip()
zip()
append()
print(sub(r'(\w)(\W)+(\w)', r'\1 \3', ''.join([u for t in zip(*matrix) for u in t])))
Seems like cookies are disabled on this browser, please enable them to open this website
Matrix Script
You are viewing a single comment's thread. Return to all comments →
First, the
strip()
in the input line just messes things up by confusing thezip()
, so I took that out; then, after theappend()
loop, I did this: