Python supports a wide range of arithmetic operators that you can use when working with numbers in your code. One of these operators is the modulo operator (%), which returns the remainder of dividing two numbers. Modular operations are useful to check if a number is even or odd, simplifying cycling through data, and doing non-decimal based units conversion.
Python’s % operator’s been around for a long time. The code shown you has all been tested using Python 3.9, but you should be able to use it in pretty much any version of Python.
Click here to learn more: https://realpython.com/courses/python...
Auf dieser Seite können Sie das Online-Video Using the Python Modulo % Operator mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Real Python 11 Februar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 22,064 Mal angesehen und es wurde von 278 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!