You are viewing a single comment's thread. Return to all comments →
#!/bin/python3 import re first_multiple_input = input().rstrip().split() N = int(first_multiple_input[0]) M = int(first_multiple_input[1]) matrix = [] for _ in range(N): matrix_item = input() matrix.append(matrix_item) decoded = "" for m in range(M): for n in range(N): decoded +=matrix[n][m] clean = re.sub(r'(?<=[A-Za-z0-9])[^A-Za-z0-9]+(?=[A-Za-z0-9])', ' ', decoded) print(clean)
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 →