I don't know how to print certain lines of code from a text file. All it is doing nothing when I run the below code.How to read specific lines from the file ?.
line = open ("random.txt",2)
print(line)
line = open ("random.txt",5)
print(line)
line = open ("random.txt",7)
print(line)
line = open ("random.txt",9)
print(line)
line = open ("random.txt",10)
print(line)
myFile.close()
my output can be random string and I don't mind as long as it prints only the set of lines.