The methods which begin and end with two underscore characters called?
Answers
Answered by
16
Explanation:
the methods which begin and end with 2 underscore characters
Answered by
4
Special methods in python always starts with double underscore. This is also called as Dunder (double underscore) method. These are also called as Magic methods. These are commonly used for operator overloading. Few Dunder methods are listed below:
add, mul, sub, div, mod, pow, lshift, rshift, and, xor, or, neg, pos, abs, invert, long, float, oct, hex, lt, le, eq, ne, ge, gt, imod, ipow, iand, ixor, ior, iadd, isub.
Similar questions