SyntaxFix
Write A Post
Hire A Developer
Questions
As of 3.8 pythons pow() function can take a modulus and a negative integer. See here. Their case for how to use it is
>>> pow(38, -1, 97) 23 >>> 23 * 38 % 97 == 1 True