Operator Overloading
Learn to overload an operator in Python.
We'll cover the following
Python permits operator overloading but within certain constraints:
- Overloading the operators for built-in types is not allowed.
- Creating new operators is not allowed.
- Few operators can’t be overloaded, e.g.,
is
,and
,or
andnot
.
Get hands-on with 1400+ tech skills courses.