Python divmod() built-in function

From the Python 3 documentation

Take two (non-complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary arithmetic operators apply.

Examples

>>> divmod(2, 2)
# (1, 0)
>>> divmod(10, 2)
# (5, 0)
>>> divmod(7, 2)
# (3, 1)

Ups! Nothing here yet!

This is a great opportunity for you to collaborate! Hit the link at the end of this page and add some examples and a brief description. If you don't know where to start, the Python 3 documentation will lead you in the right direction.

Subscribe to pythoncheatsheet.org

A bullshit free publication, full of interesting, relevant links.