擅长:python、mysql、java
<p><code>write</code>总是返回None,因此此表达式只是用于调用<code>j(...)</code>的副作用。循环总是在C上</p>
<p>部分除臭版</p>
<pre><code>import struct
v = 1500
x = 1000
C = range(v*x)
M = '<QIIHHHH'
with open('M.bmp','wb') as fin
fin.write('BM'+struct.pack(M, v*x*3+26, 26, 12, v, x, 1, 24))
for X in C:
...
</code></pre>
<p>代码段似乎正在写入bmp文件的头。我想for循环会写剩下的</p>