擅长:python、mysql、java
<pre><code>data = []
read = False
for line in open('test.dat'):
if line.strip() == '( "head"':
read = True
continue
elif line.strip() == '( "arraydat"':
read = False
if read:
data.append(line.rstrip())
print('\n'.join(data))
</code></pre>