You can take a look at this code.
Python also have a CSV module
my_list = []
with open('my_csv.txt') as f:
l = [i.strip().split(',') for i in f]
for i in range(len(l)):
my_list.append([int(n) for n in l[i]])
print my_list
print my_list[0][1] #Take out a number
print my_list[-1] #Take out last line of numbers
"""Output-->
[[2, 6, 3, 5, 0], [4, 0, 2, 5, 2], [5, 7, 9, 1, 0], [4, 6, 8, 2, 5], [2, 7, 9, 1, 6]]
6
[2, 7, 9, 1, 6]
"""
snippsat
Practically a Posting Shark
808 posts since Aug 2008
Reputation Points: 353
Solved Threads: 294
In python call it list not array.
This line in my code and you have number of lines.
print len(my_list)
snippsat
Practically a Posting Shark
808 posts since Aug 2008
Reputation Points: 353
Solved Threads: 294