I have the following code:
test_file = open("test.txt","r")
line1 = test_file.readline(1)
test_file.close()
line1 = int(line1)
print(line1)
I have 12
written into the file.
I simply get the output 1
.
Can someone please explain what is wrong with this code?