How do I add up all of the values of a column in a python array? Ideally I want to do this without importing any additional libraries.
input_val = [[1, 2, 3,
One-liner using list comprehensions: for each column (length of one row), make a list of all the entries in that column, and sum that list.
output_val = [sum([input_val[i][j] for i in range(len(input_val))]) \ for j in range(len(input_val[0]))]