[Solved] Reading and Writing from files in python [closed]


You could try something like this:

f = open("C:/file.txt", "r")  #name of file open in read mode

lines = f.readlines()   #split file into lines

print(lines[1])  #print line 2 from file

1

solved Reading and Writing from files in python [closed]