Name

cmp

Synopsis

cmp(x,y)

Returns 0 when x equals y, -1 when x is less than y, or 1 when x is greater than y. See also __cmp__ in Chapter 5.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.