#The text file contains
What you perceive
as real
may not be
even close
to the reality
with open(“D:/Songs/text.txt”, “r”) as file1:
file1.seek(24)
content4 = file1.read()
print(f”n{content4}”)
I was trying to read the file from 24th index and printing the content from 24th index. I was expecting the file to print 24th index “l” only in the first line instead I got “al” in the first line as output.
Nivaethan Rudraharan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.