擅长:python、mysql、java
<p>我会用<code>open</code>而不是<code>npy.loadtxt</code></p>
<pre><code>with open(filename, 'r') as the_file:
all_data = [line.strip() for line in the_file.readlines()]
height_line = all_data[3]
data = all_data[8:]
</code></pre>
<p>然后可以解析<code>height_line</code>的值,以获得总高度。文件中的所有数据都在变量<code>data</code>中。</p>