New course! Every coder should learn Generative AI!
Try a free lesson0
Print(pow (2,2,3)) ans is 1 how?
2 Answers
+ 3
Sai Deepika Kathiri , the third argument if present applies the modulo operation so (2**2)%3 => 1. You can read more here: https://docs.python.org/3.5/library/functions.html#pow
0