Beginner question please help!

Emile van Sebille emile at fenx.com
Thu Feb 14 12:05:32 EST 2002


"Michael Tu" <michael.tu at reachasia.net> wrote in message
news:28eed654.0202140843.510948d5 at posting.google.com...
> Hello,
>
> I am trying to do the following exercise but after spending couple of
> hours without any luck, I think it is time to get some helps. Thank
> you in advance.
>
> Write a compare function that return 1 if x > y, 0 if x == y, and -1
> if x < y.
>

This sounds like homework...

Read up on compare in the documentation.  Pay particular attention to
the cmp() builtin function.  Post your effort if you continue to have
trouble so we can see where you're going with it.

Good luck,

Emile van Sebille
emile at fenx.com





More information about the Python-list mailing list