What Does Mean in Python [Explained]

Wonders, what does mean in Python Programming.

An operator is a symbol or function which performs a specific function and yields results.

Every programming language has a certain defined set of predefined symbols that have a specific meaning attached to it and those symbols are generally neither alphabetical characters nor numeric characters or digits. Though some special characters are present which are may be used as words on a daily basis by us but they have a certain meaning when it comes into programming.

What Does Mean in Python?

Now these symbols or special functions operate over a specific predefined.

For example, the ‘equal to’ symbol (=), is predefined in python and most of the languages used as an assignment operator. So in its case the name of the operator is on the left side of the equal to sign and whatever expression that is on the right side will be assigned to it.

so, ‘=’ this sign is associated with assigning the value and there are many more which are really common and are used on a regular basis for some of the other reasons.

Now, in python there are a variety of operators that perform different functions. The basic operators provided in python through which python is actually operated are,

Operators In Python Programming

Arithmetic operators perform functions like addiction, subtraction, multiplication, division, etc.

The comparison operator is associated with a comparison of operands like one is greater than the other or less than or equal, not equal, etc.

  • Assignment operators are the ones that assign values, like the equal to (=) sign. There are more assignment operators too.
  • Logical operators are where the condition or logical expression is tested whether one logical expression and the other logical expression is true or not.
  • The bitwise operators are those, when the operation is done on the bits of a certain expression.
  • Membership operator is the one which is usually found or say used along with either say a list object or a dictionary object or say sequential ones.
  • Identity operators are again treated upon the sequential basis and is very similar to membership operators.

Now the most common ones are arithmetic operators, assignment operators,

Arithmetic Operators in Python

OperatorDescriptionExample
   +Adds two operands or unary plusx+y  , 2
Subtracts right operand from left or unary minusx-y  , -2
*Multiplies two operandsx*y
/Divides left operand by rightx/y
//Floor division – division that results into whole number adjusted to the left in the number linex//y

Bitwise operator in Python

OperatorDescriptionExample
&Bitwise ANDx&y
|Bitwise ORx|y
^Bitwise XOR~x
~Bitwise NOTx^y
<<Bitwise Left shiftx<<2
>>Bitwise Right shiftx>>2

Logical operators

OperatorMeaningExample
andTrue if both operands are truex and y
notTrue if operand is falsenot x

You Might Also Want To Read: