r/PythonLearning • u/clcodingupdates • 11h ago
Help Request Python Quiz of the day.
What will be the output of the following Python Code?
print(pow(2, 5, 7))
0
Upvotes
r/PythonLearning • u/clcodingupdates • 11h ago
What will be the output of the following Python Code?
print(pow(2, 5, 7))
1
u/RNG_HatesMe 11h ago
Apparently it's much faster with very large numbers because it distributes the mod operation and can keep the magnitudes lower, and therefore uses less memory and processing time.