I currently have a text file containing data like so
0
0
0
1
0
1
5...
I'm struggling to read the file in as a list [0,0,0,1,0,5...]
or as a numpy array. These txt files are around 400 lines of data. using the f.readlines()
function is currently giving me a list that looks like ['0/n','0/n','0/n','1/n','0/n','5/n'...]
. if anyone knows a good way of doing this it would be much appreciated.