Home / Python / Day 1: Python Basics / Operators

Operators

Operators perform operations on variables and values: arithmetic, comparison, logical, assignment, and more.

Python Operators

Operators are symbols that perform operations on operands (values/variables).

Arithmetic Operators

+, -, *, /, //, %, **

Comparison Operators

==, !=, >, <, >=, <=

Logical Operators

and, or, not

Assignment Operators

=, +=, -=, *=, /=, //=, **=, %=

Identity & Membership

is, is not, in, not in