Introduction If you have used python before, you may have seen a code snippet like this: if __name__ == '__main__': # do something This code is so simple and short, but do you fully understand what it means, and why it is so important to avoid e...
Dunder stands for "double underscore." In Python, these are special methods (or functions) that have double underscores at the beginning and end of their names. They're also called "magic methods." Imagine you're playing with a special toy. It has bu...
Python uses several special variables, often referred to as "dunder" (double underscore) variables or "magic methods" in the context of OOP, that have specific meanings and are used by the Python interpreter for particular purposes. This double under...
In Python, the term "dunder" is short for "double underscore" or "dunder mifflin", and it is often used to refer to special methods that have two leading and two trailing underscores. These methods are also known as "magic methods" because they allow...