擅长:python、mysql、java
<p>您的错误源于对语法<code>for i in expl_sounds</code>的误解<em>循环中的i是一个整数</em>不是真的,<code>i</code>是<code>expl_sounds</code>的一个元素,是您刚才添加的<code>pygame.mixer.Sound</code>实例的一个元素</p>
<hr/>
<p>所以直接使用对象</p>
<pre><code>for sound in expl_sounds:
sound.set_volume(Sound_Volume)
</code></pre>
<p>要按索引进行,请执行以下操作:</p>
<pre><code>for i in range(len(expl_sounds)):
expl_sounds[i].set_volume(Sound_Volume)
</code></pre>