python3.7 cmp()已经不存在了,如果你需要实现比较功能,需要引入 operator 模块,适合任何对象
>>> import operator>>> operator.eq('hello', 'name');False>>> operator.eq('hello', 'hello');True
区别四:string 字母 大小写字符串
string.letters:包含所有字母(大写或小写)的字符串
Python 3.0中,string.ascii_letters.
【推荐课程:Python专栏课程】
以上就是Python 2.7与Python 3.7区别的详细内容,更多请关注Gxl网其它相关文章!
查看更多关于Python2.7与Python3.7区别的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did81108