0% found this document useful (0 votes)
2 views

Python Operators

The document provides an overview of Python operators, which are used to perform operations on variables and values. It categorizes operators into groups such as arithmetic, assignment, comparison, logical, identity, membership, and bitwise operators. Additionally, it lists examples of arithmetic operators and their functions.

Uploaded by

rheemchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python Operators

The document provides an overview of Python operators, which are used to perform operations on variables and values. It categorizes operators into groups such as arithmetic, assignment, comparison, logical, identity, membership, and bitwise operators. Additionally, it lists examples of arithmetic operators and their functions.

Uploaded by

rheemchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

5/26/25, 8:04 AM Python Operators

Python Operators
❮ Previous Next ❯

Python Operators
Operators are used to perform operations on variables and values.

In the example below, we use the + operator to add together two values:

Example Get your own Python Server

print(10 + 5)

Run example »

Python divides the operators in the following groups:

Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Identity operators
Membership operators
Bitwise operators

Python Arithmetic Operators


Arithmetic operators are used with numeric values to perform common mathematical operations:

Operator Name Example Try it

+ Addition x+y Try it »

- Subtraction x-y Try it »

* Multiplication x*y Try it »

/ Division x/y Try it »

% Modulus x%y Try it »

https://www.w3schools.com/python/python_operators.asp 1/2
5/26/25, 8:04 AM Python Operators

** Exponentiation x ** y Try it »

// Floor division x // y Try it »

ADVERTISEMENT

Python Assignment Operators

https://www.w3schools.com/python/python_operators.asp 2/2

You might also like