Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

1.1 KB
Raw Blame

title: Python divmod() built-in function - Python Cheatsheet description: 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.

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)