list comprehension replace for loop in 2d matrix,[int(x) for line in data for x in line.split()]