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

Python Operators

The document discusses different types of operators in Python including arithmetic, comparison, assignment, logical, bitwise, membership, and identity operators. It provides examples of common arithmetic operators like addition, subtraction, multiplication, and division and explains what each operator does.

Uploaded by

Lena Devaraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Python Operators

The document discusses different types of operators in Python including arithmetic, comparison, assignment, logical, bitwise, membership, and identity operators. It provides examples of common arithmetic operators like addition, subtraction, multiplication, and division and explains what each operator does.

Uploaded by

Lena Devaraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Operators in general are used to perform operations on values and

variables. Operators are the pillars of a program on which the logic is built in a
specific programming language. Python provides a variety of operators, which are
described as follows.

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

Arithmetic operators

Arithmetic operators are used with numeric values to perform common


mathematical operations.

Operator Description Syntax

+ Addition: adds two operands x+y

– Subtraction: subtracts two operands x–y

* Multiplication: multiplies two operands x*y

/ Division (float): divides the first operand by the second x/y

Division (floor): divides the first operand by the


// second x // y

Modulus: returns the remainder when the first operand


% is divided by the second x%y

** Power: Returns first raised to power second x ** y

You might also like