开发者社区 问答 正文

python中cmp怎么回事

python中cmp怎么回事

展开
收起
云计算小粉 2018-05-10 20:10:57 1902 分享 版权
1 条回答
写回答
取消 提交回答
  • 热衷于研究前端新知识,学习新技术。精通HTML5+CSS3,Javascript,jQuery,Angular,Bootstrap。

    cmp( x, y)
    Compare the two objects x and y and return an integer according to the outcome. The return value is negative if x < y, zero if x == y and strictly positive if x > y.
    比较2个对象,前者小于后者返回-1,相等则返回0,大于后者返回1.

    2019-07-17 22:24:01
    赞同 展开评论
问答分类:
问答标签:
问答地址: