Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open(filepath) as fp:
- line = int(fp.readline())
- for i in range(0, line):
- size = int(fp.readline())
- matrix = []
- for j in range(0, size):
- row = fp.readline()
- row = row.split() # split in every space
- row = [int(x) for x in row]
- matrix.append(row)
- print(matrix)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement