擅长:python、mysql、java
<p>使用python 2.7.13:</p>
<pre><code>>>> from collections import Counter as c
>>> c
<class 'collections.Counter'>
>>> from collections import Counter
>>> Counter
<class 'collections.Counter'>
>>> id(c), id(Counter)
(140244739511392, 140244739511392)
>>> id(c) == id(Counter)
True
</code></pre>
<p>是的,<code>c</code>和<code>Counter</code>是一样的。引用同一对象的两个变量(名称)。你知道吗</p>