Current location - Training Enrollment Network - Mathematics courses - What does% mean in python?
What does% mean in python?
Python is a programming software that many programmers will use. With python, you can write code quickly and the code runs very fast. In python, there are often many symbols, English letters and so on. For example, I'm going to introduce some meanings of% in python today. If you are not sure, come and learn more.

Python development tool

Python development tool is a very good entry tool for small partners who want to learn programming by themselves. This software is not so demanding on python language, and the current mainstream operating platforms can also support it perfectly. The interface of this software is simple, and the operation of the software is also simple. What are you waiting for? Download it if you need it.

What does% mean in python?

1, description

% has two uses in Python, one is in mathematical operation, and the other is in string.

2. Numerical operation

% stands for modulus and returns the remainder of division.

7%2

1

3. Line

The operation of putting other variables in a specific position of a string to generate a new string.

Age = 22 years old

//mynameis22

Print "My name is% s"% n

Summary:

1, description

% has two uses in Python, one is in mathematical operation, and the other is in string.

2. Numerical operation

% stands for modulus and returns the remainder of division.

3. Line

The operation of putting other variables in a specific position of a string to generate a new string.

The above is a concrete introduction to% in python. I hope it helps you.