擅长:python、mysql、java
<p>谢谢你的评论。建议的阅读材料导致了其他有帮助的事情。下面是我想到的:</p>
<pre><code>if len(line) >= 45:
if line[0:45] == " FIT OF SIMULATED EQUIVALENTS TO OBSERVATIONS": #! indicates data to follow, after 4 lines of junk text
for i in range (0,4):
junk = file.readline()
for i in range (0,int(nobs)):
line = file.readline()
sline = line.split()
obsname.append(sline[0])
hm.append(sline[1])
hs.append(sline[2])
</code></pre>