Real Python Tutorials
Python Modulo in Practice: How to Use the % Operator
In this tutorial, you'll learn about the Python modulo operator (%). You'll look at the mathematical concepts behind the modulo operation and how the modulo operator is used with Python's numeric types. You'll also see ways to use the modulo operator in your own code.
Not Sure Where to Start?
At Real Python you can learn all things Python from the ground up. If you’re wondering where to begin your Python journey, click the button below and we’ll give you some guidance:
🐍 Python Tricks 💌
Get a short & sweet Python Trick delivered to your inbox every couple of days. No spam ever. Unsubscribe any time. Curated by the Real Python team.