I have been searching online, but have not found any good solution.
Here is my text file:
[54, 95, 45, -97, -51, 84, 0, 32, -55, 14, 50, 54, 68, -3,
I too wanted to read the first line of a file:
# open the file and read the contents fp = open(file_path_name) content = fp.readline() # read just the first line print(content)
Worked well for me.