Operator overloading in python | Python tutorial for absolute beginners in Hindi

Опубликовано: 09 Март 2021
на канале: CodeWithRajat
116
2

Operator overloading in python | Python tutorial for absolute beginners in Hindi

Like other languages (for example, method overloading in C++) do, python does not support method overloading by default. But there are different ways to achieve method overloading in Python.

The problem with method overloading in Python is that we may overload the methods but can only use the latest defined method.

You can change the meaning of an operator in Python depending upon the operands used. In this tutorial, you will learn how to use operator overloading in Python Object Oriented Programming.

Python operators work for built-in classes. But the same operator behaves differently with different types. For example, the + operator will perform arithmetic addition on two numbers, merge two lists, or concatenate two strings.

This feature in Python that allows the same operator to have different meaning according to the context is called operator overloading.


На этой странице сайта вы можете посмотреть видео онлайн Operator overloading in python | Python tutorial for absolute beginners in Hindi длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь CodeWithRajat 09 Март 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 116 раз и оно понравилось 2 зрителям. Приятного просмотра!