Python program to read txt file data from specified index to specified length
Write a python
Solution
fname=input("Enter the Source File Name : ")
pos=int(input("Enter the start index : "))
size=int(input("Enter the length to read no of char : "))
fp=open(fname,"r")
fp.seek(pos)
data=fp.read(size)print(data)
fp.close()