A Powerful Python Function To Know: divmod()

@lee-rowe
2 min readJan 17, 2022
Photo by Amol Tyagi on Unsplash

The divmod() is a built-in Python function that will return a tuple containing the quotient as well as the remainder when argument1 (dividend) is divided by argument2 (divisor). This can be a super useful tool in many different situations and it is incredibly easy to use. All that is needed is two variables that are equal to your dividend and divisor as your arguements. I will provide clear examples to help…

--

--