摘要:
Classes wishing to support the rich comparison mechanisms must add one or more of the following new special methods: def __lt__(self, other): ... def __le__(self, other): ... def __gt__(self, other): ... ... 阅读全文
摘要:
昨天偶然看见一个算法题,要求返回一个包含给定英文字符串(小写)中所有最长的升序字符串的列表,比如:findmax('abc')-->['abc']findmax('afz')-->['afz']findmax('cba')-->['c','b','a']findmax('zfa')-->['z','f','a']findmax('abczabc')-->[ 阅读全文