You are viewing a single comment's thread. Return to all comments →
With the help of regEx :
import sys, re, numpy entry = sys.stdin.read().replace(' ', '').splitlines()[1:] my_array = [] for i in range(len(entry)): my_array.append([int(i) for i in re.findall(r"\d", entry[i])]) my_array = numpy.array(my_array) print(numpy.transpose(my_array), my_array.flatten(), sep='\n')
Seems like cookies are disabled on this browser, please enable them to open this website
Transpose and Flatten
You are viewing a single comment's thread. Return to all comments →
With the help of regEx :