擅长:python、mysql、java
<p>使用额外的索引和模运算符如何:</p>
<pre><code>a%b
</code></pre>
<p>例如:</p>
<pre><code>idx = 6
for h,aaline in enumerate(glmfile):
if aaline.startswith('object node {') and ('SWING' not in glmfile[h+3]):
if glmfile[h+1][13:-2].strip() in node_names or idx%6!=0:
idx = idx+1
print glmfile[h:h+6]
pass
else:
combined.writelines([glmfile[h:h+6]])
</code></pre>