Answer the question
In order to leave comments, you need to log in
How to get a specific row and the content in it?
I have given line in .txt file:
VERSION: 0.1.0
NAME: name.
AUTHOR: author.
Answer the question
In order to leave comments, you need to log in
data = {}
for line in open('some.txt', 'r').readlines():
if line.startswith('VERSION'):
data[0] = line[9:]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question