I have a .csv file that has just one column of numbers and I want to read each number in the column and print it in the console like this:
1
2
3
4
here is the code that I have used:
file_reference2 = open("file1.csv", "r")
read_lines1 = file_reference1.readlines()
for line1 in read_lines1:
print(line1)
file_reference1.close()
what I expect is:
1
2
3
in the console.
But what I get is:
1
And the program stops. How do I make it print the whole file?