Home  >  Article  >  Backend Development  >  What is the remainder operator in python

What is the remainder operator in python

藏色散人
藏色散人Original
2019-06-27 09:46:3920453browse

What is the remainder operator in python

What is the remainder operator in python?

Python's remainder operator is %, which means taking modulo and returning the remainder of division.

Assume variables: a=10, b=20:

Then b % a output result 0

Note:

The Python language supports the following types of operators:

Arithmetic operators

Comparison (relational) operators

Assignment operators

Logical operators

Bit operator

Member operator

Identity operator

Operator precedence

Related recommendations: "Python Tutorial

The above is the detailed content of What is the remainder operator in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn