You are viewing a single comment's thread. Return to all comments →
import re
n, m = input().strip().split()
tt = []
ss = []
for _ in range(int(n)):
itm = input() tt.append(itm)
res = "".join(tt)
for nm in range(int(m)):
for th in range(nm, len(res), int(m)): ss.append(res[th])
fin = re.sub(r"[!,@,#,$,%,&]+(?=([A-z0-9]))", " ", "".join(ss)) print(fin)
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 →
import re
n, m = input().strip().split()
tt = []
ss = []
for _ in range(int(n)):
res = "".join(tt)
for nm in range(int(m)):
fin = re.sub(r"[!,@,#,$,%,&]+(?=([A-z0-9]))", " ", "".join(ss)) print(fin)