📌  相关文章
📜  如何从另一个类python调用一个类? - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.284000             🧑  作者: Mango

代码示例1
from collections import Counter


class FancyCounter(Counter):
    def commonest(self):
        (value1, count1), (value2, count2) = self.most_common(2)
        if count1 == count2:
            raise ValueError("No unique most common value")
        return value1