Try using dividend % divisor, this will return the remainder Rohan Pai -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20110109/821ba787/attachment.html>