- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are different assignment operators types in Python?
Following table shows all assignment operators −
Operator | Description | Example |
---|---|---|
= | Assigns values from right side operands to left side operand | c = a + b value of a + b into c |
+= | It adds right operand to the left operand and assign the result to left operand | c += a add a into c |
-= | It subtracts right operand from the left operand and assign the result to left operand | c -= a subtract a from c |
*= | It multiplies right operand with the left operand and assign the result to left operand | c *= a multiply c by a and assign to c |
/= | It divides left operand with the right operand and assign the result to left operand | c /= a divide c by a and assign to c |
%= | It takes modulus using two operands and assign the result to left operand | c %= a assign remainder of c/a to c |
**= | Performs exponential (power) calculation on operators and assign value to the left operand | c **= assign c raised to a to c |
//= | It performs floor division on operators and assign value to the left operand | c //= a floor division of c/a assigned to c |
- Related Articles
- What are different Identity operators types in Python?
- What are different bitwise operators types in Python?
- What are Assignment Operators in JavaScript?
- What are assignment operators in C#?
- Python Assignment Operators
- What are the assignment operators in Java?
- What are different basic operators in Python?
- What are different arithmetic operators in Python?
- Different types of operators in C++
- Assignment Operators in C++
- Java Assignment Operators
- Perl Assignment Operators
- What are different types of quotes in Python?
- Compound Assignment Operators in C++
- Compound assignment operators in C#

Advertisements