reading a triangle of numbers into a 2d array of ints in python,arr = [[int(i) for i in line.split()] for line in open('input.txt')]