擅长:python、mysql、java
<p>要准确地理解你在追求什么有点困难,但试试这个:</p>
<pre><code>def mon_fonction(une_formation, TYPE_RECHERCHE):
tot = 0
liste = []
for quel, val in une_formation:
if quel == TYPE_RECHERCHE:
tot += val
liste.append(val)
print "Les vals sont:", liste
print "en tout:", tot
return tot
</code></pre>