• **: 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....
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!)
People also ask

What is Python and the Uses of Python?
Python is a high-level programming language known for its simplicity. It’s used in Web Development, Data Science, Automation, Machine Learning, and more. Its readable syntax makes it an ideal choice for both beginners and professionals.
🌐
theknowledgeacademy.com
theknowledgeacademy.com › blog › python-operators
Python Operators: Definition, Types With Examples
Why do We Use an Operator?
We use operators in Python to perform operations on variables and values. They help in tasks like calculations, comparisons, data manipulation, and decision-making, making the code more efficient and logical.
🌐
theknowledgeacademy.com
theknowledgeacademy.com › blog › python-operators
Python Operators: Definition, Types With Examples
What are the Other Resources and Offers Provided by The Knowledge Academy?
The Knowledge Academy takes global learning to new heights, offering over 3,000 online courses across 490+ locations in 190+ countries. This expansive reach ensures accessibility and convenience for learners worldwide. Alongside our diverse Online Course Catalogue, encompassing 19 major categories, we go the extra mile by providing a plethora of free educational Online Resources like Blogs, eBooks, Interview Questions and Videos. Tailoring learning experiences further, professionals can unlock greater value through a wide range of special discounts, seasonal deals, and Exclusive Offers.
🌐
theknowledgeacademy.com
theknowledgeacademy.com › blog › python-operators
Python Operators: Definition, Types With Examples
🌐
Python
docs.python.org › 3 › library › operator.html
operator — Standard operators as functions
This table shows how abstract operations correspond to operator symbols in the Python syntax and the functions in the operator module.
🌐
Slainstitute
slainstitute.com › operators-in-python
Python Operators: A Comprehensive Guide to Using Operators in Python | SLA
February 25, 2025 - Learn about the various operators in Python, including arithmetic, comparison, logical, assignment, bitwise, and identity operators, with examples and explanations of their usage. | Operators in Python
🌐
Python
wiki.python.org › moin › BitwiseOperators
BitwiseOperators - Python Wiki
Of course, Python doesn't use 8-bit numbers. It USED to use however many bits were native to your machine, but since that was non-portable, since Python 3 ints are arbitrary precision. Thus the number -5 is treated by bitwise operators as if it were written "...1111111111111111111011".
🌐
Cisco
ipcisco.com › home › python operators
Python Operators ⋆ IpCisco
January 10, 2022 - Here, we will control our variable with >= operator. If it is equal or greater than the mentioned value, it will break printing. ... It will start to print from 0 to 5. But it will control the value of x every time if it is equal or greater than 4. So, in the output, there will be only the values lower than 4. ... To combine conditional statements, we use python logical operators.
Find elsewhere
🌐
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
🌐
Towards Data Science
towardsdatascience.com › home › latest › mastering python operators: the ultimate guide
Mastering Python Operators: The Ultimate Guide | Towards Data Science
January 13, 2025 - In our example, the minus sign is the operator. The two operands are the numbers nine and three. Finally, the number six is the result of the operation. Python distinguishes between different types of operators, which we will explain in more detail in the following chapters.
🌐
Skill Nuggets
skillnuggets.co.uk › free juniper and cisco training get your jncia and ccna today › blog › basic programming concepts: python operators
Basic programming concepts: Python Operators - Skill Nuggets
October 12, 2024 - Learn the basics of Python programming with this guide to Python operators. Understand the different types of operators, how to use them, and how to combine them to create powerful expressions.
🌐
The Knowledge Academy
theknowledgeacademy.com › blog › python-operators
Python Operators: Definition, Types With Examples
February 2, 2026 - Python Operators are special symbols used to perform operations on variables and values. They are crucial in coding for Data Science, Machine Learning and more. They include arithmetic, comparison, logical, assignment, bitwise, identity, and ...
🌐
Python documentation
docs.python.org › 3 › reference › datamodel.html
3. Data model — Python 3.14.3 documentation
All data in a Python program is represented by objects or by relations between objects. Even code is represented by objects. Every object has an identity, a type and a value. An object’s identity never changes once it has been created; you may think of it as the object’s address in memory. The is operator compares the identity of two objects; the id() function returns an integer representing its identity.
🌐
Medium
mike-vincent.medium.com › quarks-outlines-python-operators-cec410619557
Quark’s Outlines: Python Operators | by Mike Vincent | Medium
April 28, 2025 - Arithmetic Python operators like + (addition), -(subtraction), * (multiplication), and / (division) perform calculations. Comparison Python operators like == (equal to) and > (greater than) check relationships between values.
🌐
ScholarHat
scholarhat.com › home
Operators in Python - Types of Operators in Python ( With Examples )
September 11, 2025 - This code defines the two variables "a" and "b." It then applies several arithmetic operations to them (including addition, subtraction, multiplication, division, modulus, exponentiation, and floor division) and outputs the results. a + b : 31 a - b : 11 a * b : 210 a / b : 2.1 a % b : 1 a ** b : 16679880978201 a // b : 2 ... To compare two values, Python comparison operators are needed.
🌐
YouTube
youtube.com › watch
Python | Operators, Comments & Operator Precedence! Arithmetic, Assignment, Logical & Relational - YouTube
🐍 Python Comments, Operators & Operator Precedence 💻Understanding operators in Python is a must to write powerful and logical programs 🚀In this beginner-f...
Published   January 26, 2026
Views   130
🌐
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.
Top answer
1 of 3
88

It's not an operator as such, so it doesn't really have a name, but it is defined as a "syntactic rule". So it should be called:

  • "the keyword argument unpacking syntax"

If you have a list of arguments, *args, it's called "argument unpacking", in the same manner **kwargs is called "keyword argument unpacking".

If you use it on the left hand side of an =, as in a, *middle, end = my_tuple, you'd say "tuple unpacking".

In total, there are three types of (single parameter) arguments:

def f(x)  # x: positional argument
def f(x, y=0)  # y: keyword argument
def f(x, *xs, y=0)  # y: keyword-only argument

The *args argument is called the "variable positional parameter" and **kwargs is the "variable keyword parameter". Keyword-only arguments can't be given positionally, because a variable positional parameter will take all of the arguments you pass.

Most of this can be found in PEPs 0362 and 3102, as well as in the Control Flow section of the docs. It should be noted though that the function signature object PEP is only a draft, and the terminology might just be one person's idea. But they are good terms anyway. :)

So the * and ** arguments just unpack their respective data structures:

args = (1, 2, 3)  # usually a tuple, always an iterable[1]

f(*args) → f(1, 2, 3)

# and 

kwargs = {"a": 1, "b": 2, "c": 3}  # usually a dict, always a mapping*

f(**kwargs) -> f(a=1, b=2, c=3)

[1]: Iterables are objects that implement the __iter__() method and mappings are objects that implement keys() and __getitem__(). Any object that supports this protocol will be understood by the constructors tuple() and dict(), so they can be used for unpacking arguments.

2 of 3
13

I don't think it has a name. In the Python Docs under "Unpacking Argument Lists", it's just referred to as "the **-operator."

I'm not sure what you mean by "the other" data structure. When you do f(**kwargs) you unpack the dictionary kwargs as a sequence of key-value pairs. I don't see that there's another structure involved.

I'll copy the example in the above documentation for clarity.

>>> def parrot(voltage, state='a stiff', action='voom'):
...     print "-- This parrot wouldn't", action,
...     print "if you put", voltage, "volts through it.",
...     print "E's", state, "!"
...
>>> d = {"voltage": "four million", "state": "bleedin' demised", "action": "VOOM"}
>>> parrot(**d)
-- This parrot wouldn't VOOM if you put four million volts through it. E's bleedin' demised !

See also: What does *args and **kwargs mean?

🌐
Python documentation
docs.python.org › 3 › reference › expressions.html
6. Expressions — Python 3.14.3 documentation
3 weeks ago - 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.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-logical-operators
Python Logical Operators - GeeksforGeeks
Python logical operators are used to combine or modify conditions and return a Boolean result (True or False).
Published   3 weeks ago
🌐
WsCube Tech
wscubetech.com › resources › python › operators
Operators in Python: All Types With Examples
October 1, 2025 - Learn about Python operators with examples in this comprehensive guide. Understand arithmetic, logical, comparison, and more operators for effective coding.