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教程》
以上就是python2.7和3.7的区别的详细内容,更多请关注Gxl网其它相关文章!
查看更多关于python2.7和3.7的区别的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did79490