擅长:python、mysql、java
<p>看看这个:</p>
<pre><code>>>> from collections import Counter
>>> mystr = "AaAaaEeEiOoouuu"
>>> a,b = Counter(c for c in mystr.lower() if c in "aeiou").most_common(1)[0]
>>> "the most frequent vowel is {} occurring {} times".format(a.upper(), b)
'the most frequent vowel is A occurring 5 times'
>>>
</code></pre>
<p>这里是<a href="http://docs.python.org/2/library/collections.html#collections.Counter" rel="nofollow">^{<cd1>}</a>的参考。在</p>
<hr/>
<p><strong>编辑:</strong></p>
<p>下面是一个逐步演示的过程:</p>
^{pr2}$