What is Assignment Operator in Python | EP-36 Assignment Operator in Python | Free Python Tutorials

Subscribers:
28,000
Published on ● Video Link: https://www.youtube.com/watch?v=3PQAyIeukxU



The Operator
Game:
Duration: 0:00
95 views
1


Assignment Operator

Assignment Operators are used to assign values to variables. This operator is used to
assign the value of the right side of the expression to the left side operand.
from Numeric_datatype import result

a=3
b=5
c=a+b
print(c)



Addition Assignment Operator

The Addition Assignment Operator is used to add the right-hand side operand with the left-hand side operand and then assign the result to the left operand.

Syntax: a += b-- a = a+b
a=5
b=10
a+=b #a=a+b--a=5+10
print(a)



Subtraction Assignment Operator

The Subtraction Assignment Operator is used to subtract the right-hand side operand from the left-hand side operand and then assigning the result to the left-hand side operand.

Syntax: a = b -- a=a-b
a=10
b=5
a-=b
print(a)


Multiplication Assignment Operator

The Multiplication Assignment Operator is used to multiply the right-hand side operand with the left-hand side operand and then assigning the result to the left-hand side operand.

Syntax: a *= b--a=a*b
a=3
b=3
a*=b
print(a)



Division Assignment Operator

The Division Assignment Operator is used to divide the left-hand side operand with the right-hand side operand and then assigning the result to the left operand.

Syntax: a /= b--- a=a/b
a=10
b=5
a/=b
print(a)

Modulus Assignment Operator

The Modulus Assignment Operator is used to take the modulus, that is, it first divides the operands and then takes the remainder and assigns it to the left operand.

Syntax: a %= b-- a=a%b
a=10
b=3
a%=b
print(a)



Floor Division Assignment Operator

The Floor Division Assignment Operator is used to divide the left operand with the right operand and then assign the result(floor value) to the left operand.

Syntax: a //= b--a=a//b
a=10
b=5
a//=b
print(a)




Exponentiation Assignment Operator

The Exponentiation Assignment Operator is used to calculate the exponent(raise power) value using operands and then assign the result to the left operand.

Syntax: a **= b-- a=a**b
a=6
b=2
a**=b
print(a)

Bitwise AND Assignment Operator

The Bitwise AND Assignment Operator is used to perform Bitwise AND operation on both operands and then assign the result to the left operand.
syntax:a&=b --- a=a&b"""
a=4 #100
b=7#111
a&=b
print(a)



Bitwise OR Assignment Operator

The Bitwise OR Assignment Operator is used to perform Bitwise OR operation on the operands and then assign result to the left operand.

Syntax: a |= b-- a= a|b
a=4 #100
b=7 #111
a|=b
print(a)

Bitwise XOR Assignment Operator

The Bitwise XOR Assignment Operator is used to perform Bitwise XOR operation on the operands and then assign result to the left operand.

Syntax: a ^= b -- a=a^b
a=4 #100
b=7 #111
a^=b
print(a)



Bitwise Right Shift Assignment Operator

The Bitwise Right Shift Assignment Operator is used to perform Bitwise Right Shift
Operation on the operands and then assign result to the left operand.


Bitwise Left Shift Assignment Operator

The Bitwise Left Shift Assignment Operator is used to perform Bitwise Left Shift
Opertator on the operands and then assign result to the left operand.


Walrus Operator
The Walrus Operator in Python is a new assignment operator which is introduced in
Python version 3.8 and higher. This operator is used to assign a value to a variable
within an expression.

Syntax: a := expression

#PythonTutorials #PythonForBeginners #AssignmentOperator #PythonProgramming #LearnPython #PythonBasics #Python2024 #CodingForBeginners #FreePythonCourse #PythonTutorial #AssignmentOperators #ProgrammingTutorial #CodingTutorial #PythonTips #PythonTrick

Connect With Us:
—————————————
➡️ Website: https://www.cybrosys.com/
➡️ Email: info@cybrosys.com
➡️ Twitter:   / cybrosys  
➡️ LinkedIn:   / cybrosys  
➡️ Facebook:   / cybrosystechnologies  
➡️ Instagram:   / cybrosystech  
➡️ Pinterest:   / cybrosys  




Other Videos By Cybrosys Technologies


2024-09-16What is For Loops in Python | EP-39 For Loops in Python | Python For Loops | Free Python Tutorials
2024-09-16How to Create User Permissions & Groups in Horilla HRMS| How to Set Access Rights for Specific Users
2024-09-16How to Manage Split Delivery Orders in Odoo 18 | Split Delivery Orders in Odoo 18 | Odoo 18 Features
2024-09-14🌸Cybro Onam 2024 | IT Company Onam Celebrations @ Cybrosys | Onam Galatta | Office Onam Celebration🌼
2024-09-13Mr🕺🏻& Ms💃🏼 Onam 2024 | Malayali Manka & Kerala Sreeman | IT Company Onam @ Cybrosys | Onam in Office
2024-09-13What is If Else Conditional Statements in Python | EP -38 Python If Else Statements | Python If Else
2024-09-13How to Manage Hired Candidates in Horilla HRMS| Hired Candidates & Filter/Export Features in Horilla
2024-09-13Get JSON Data by Changing the URL in Odoo 18 | Odoo 18 New Features | Odoo 18 Release Date | Odoo 18
2024-09-12What Are Identity & Membership Operators in Python | EP-37 Python Membership & Identity Operators
2024-09-12Return For Exchange in Odoo 18 Inventory | Odoo 18 New Features | Odoo 18 Inventory| Odoo 18 Release
2024-09-11What is Assignment Operator in Python | EP-36 Assignment Operator in Python | Free Python Tutorials
2024-09-10What are the Different Onboarding User Levels in HRMS | Free HR Software | Free Onboarding Software
2024-09-10Top Bar in Odoo 18 Project App | Odoo 18 Project Management | Odoo 18 New Features | Odoo 18 Release
2024-09-09How to Add New Employee in Horilla HRMS | Create New Employee in HRMS Software | Free HR Software
2024-09-09Loan Management in Odoo 18 Accounting | New Loan Management Feature in Odoo 18| Odoo 18 New Features
2024-09-06How to Assign Onboarding Tasks to an Employee in Horilla HRMS| Free HR Software| Onboarding Software
2024-09-05How to Configure Automation in Odoo 17 Project App | Automation in Odoo 17 Project | Odoo 17 Videos
2024-09-05How to Configure Credit Card in Odoo 18 Accounting | Credit Card in Odoo 18 | Odoo 18 New Features
2024-09-05Odoo 18 Point of Sale PWA | Odoo 18 POS Kiosk | Expected Features of Odoo 18 POS | Odoo 18 Features
2024-09-04Operators in Python | EP-35 Bitwise Operators in Python | Right-shift, Left-shift, AND, OR, NOT, XOR
2024-09-04How to Shortlist a Resume in Horilla HRMS | Resume Shortlisting | How to Get Your Resume Shortlisted