divmod()

Built-in FunctionPython 2.0+Intermediate

Returns both the quotient and remainder of integer division

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
print(divmod(17, 5))
print(divmod(10, 3))

divmod() is a built-in function that returns both the quotient and remainder of integer division.

Try in Playground

Tags

builtinfunctioncore