• **: exponentiation
  • ^: exclusive-or (bitwise)
  • %: modulus
  • //: divide with integral result (discard remainder)
Answer from John Zwinck on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_operators.asp
Python Operators
Python Examples Python Compiler ... Python Bootcamp Python Certificate Python Training ... Operators are used to perform operations on variables and values....
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ operator.html
operator โ€” Standard operators as functions
Source code: Lib/operator.py The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expres...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-operators
Python Operators - GeeksforGeeks
This operator is used to assign the value of the right side of the expression to the left side operand. ... In Python, is and is not are the identity operators both are used to check if two values are located on the same part of the memory.
Published ย  December 2, 2025
Top answer
1 of 3
198
  • **: exponentiation
  • ^: exclusive-or (bitwise)
  • %: modulus
  • //: divide with integral result (discard remainder)
2 of 3
45

You can find all of those operators in the Python language reference, though you'll have to scroll around a bit to find them all. As other answers have said:

  • The ** operator does exponentiation. a ** b is a raised to the b power. The same ** symbol is also used in function argument and calling notations, with a different meaning (passing and receiving arbitrary keyword arguments).
  • The ^ operator does a binary xor. a ^ b will return a value with only the bits set in a or in b but not both. This one is simple!
  • The % operator is mostly to find the modulus of two integers. a % b returns the remainder after dividing a by b. Unlike the modulus operators in some other programming languages (such as C), in Python a modulus it will have the same sign as b, rather than the same sign as a. The same operator is also used for the "old" style of string formatting, so a % b can return a string if a is a format string and b is a value (or tuple of values) which can be inserted into a.
  • The // operator does Python's version of integer division. Python's integer division is not exactly the same as the integer division offered by some other languages (like C), since it rounds towards negative infinity, rather than towards zero. Together with the modulus operator, you can say that a == (a // b)*b + (a % b). In Python 2, floor division is the default behavior when you divide two integers (using the normal division operator /). Since this can be unexpected (especially when you're not picky about what types of numbers you get as arguments to a function), Python 3 has changed to make "true" (floating point) division the norm for division that would be rounded off otherwise, and it will do "floor" division only when explicitly requested. (You can also get the new behavior in Python 2 by putting from __future__ import division at the top of your files. I strongly recommend it!)
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ operators
Python Operators (With Examples)
In this tutorial, we'll learn everything about different types of operators in Python, their syntax and how to use them with examples.
๐ŸŒ
DataFlair
data-flair.training โ€บ blogs โ€บ python-operator
Python Operator - Types of Operators in Python - DataFlair
July 12, 2025 - Python Operators: Learn Python arithmetic, relational, logical, assignment, bitwise, membership and identity operator with syntax & examples
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ python-operators
Python Operators - A Quick Reference | DigitalOcean
August 4, 2022 - Python operators allow us to do common processing on variables. We will look into different types of operators with examples and also operator precedence.
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-operators-tutorial
Python Operators | DataCamp
August 24, 2018 - These operators, also known as Boolean operators, evaluate multiple conditions and determine an expression's overall truth value. ... Learn about type checking, different types of the type system in various languages along with duck typing, and type hinting. ... Get introduced to Python data structures: learn more about data types and primitive as well as non-primitive data structures, such as strings, lists, stacks, etc.
Find elsewhere
๐ŸŒ
Real Python
realpython.com โ€บ python-operators-expressions
Operators and Expressions in Python โ€“ Real Python
January 11, 2025 - In Python, operators are special symbols, combinations of symbols, or keywords that designate some type of computation. You can combine objects and operators to build expressions that perform the actual computation.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ home โ€บ python โ€บ python operators
Python Operators
February 21, 2009 - Explore the different types of operators in Python, including arithmetic, comparison, logical, and bitwise, with examples.
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python โ€บ operators
Python | Operators | Codecademy
July 22, 2025 - Perform operations on variables and values using special symbols and keywords in Python.
๐ŸŒ
IONOS
ionos.com โ€บ digital guide โ€บ websites โ€บ web development โ€บ python operators
How to use Python operators - IONOS
February 22, 2023 - Python operators are used to combine literals into expressions. There are a few rules to keep in mind when it comes to Python operators. Weโ€™ll explain how they work.
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ reference โ€บ expressions.html
6. Expressions โ€” Python 3.14.3 documentation
This chapter explains the meaning of the elements of expressions in Python. Syntax Notes: In this and the following chapters, grammar notation will be used to describe syntax, not lexical analysis. When (one alternative of) a syntax rule has the form: ... When a description of an arithmetic operator below uses the phrase โ€œthe numeric arguments are converted to a common real typeโ€, this means that the operator implementation for built-in numeric types works as described in the Numeric Types section of the standard library documentation.
๐ŸŒ
ScholarHat
scholarhat.com โ€บ home
Operators in Python - Types of Operators in Python ( With Examples )
September 11, 2025 - It displays the results of binary ... a >> 2 : 240 a >> 2 : 15 ยท Python logical operators are used to compose Boolean expressions and evaluate their truth values....
๐ŸŒ
Simplilearn
simplilearn.com โ€บ home โ€บ resources โ€บ software development โ€บ operators in python: everything you need to know
Operators in Python: Everything You Need to Know
July 31, 2025 - Master Python operators through clear, practical examples. Understand how to use different types effectively in your code to optimize programming tasks.
๐ŸŒ
Hackr
hackr.io โ€บ home โ€บ articles โ€บ programming
Python Operators In-Depth Guide [2026] | Beginner to Pro
January 30, 2025 - We cover the python operators you need in 2026, inc. source code examples for arithmetic operators, comparison operators, logical operators, and more.
๐ŸŒ
Real Python
realpython.com โ€บ python-operator-module
Working With the Python operator Module โ€“ Real Python
May 3, 2024 - In this tutorial, you'll explore the Python operator module and its role in functional programming. You'll code several examples of using both operator-equivalent and higher-order functions in programs.
๐ŸŒ
LearnPython.com
learnpython.com โ€บ blog โ€บ python-operators-cheat-sheet
Python Operators Cheat Sheet | LearnPython.com
From arithmetic to bitwise operations, discover the essential Python operators and how to use them effectively with our comprehensive cheat sheet.