Implementation of triangular array in Python TM programming language