You are viewing a single comment's thread. Return to all comments →
the first option(better):
print(re.sub(r'\b\W+\b', ' ', ''.join([''.join([x[i] for x in matrix]) for i in range(m)])))
the second option:
s = ''.join([''.join([mat[i] for mat in matrix]) for i in range(m)]) t = max([''] + re.findall(r'[0-9a-zA-Z].*[0-9a-zA-Z]', s)) tn = re.sub(' +', ' ', re.sub(r'[!@#$%&]', ' ', t)) print(s.replace(t, tn))
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 →
the first option(better):
the second option: