What built-in function can you use to do modulo division?

Questions & AnswersCategory: PythonWhat built-in function can you use to do modulo division?
1 Answers
Geek Boy Staff answered 2 years ago

b. divmod()
Explanation:

divmod(ab) – 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. For integers, the result is the same as (a // b, a % b).