Python - Magic Methods and Operator Overloading
Which of the following is the correct syntax to define the less than operator
< in a Python class?< in a Python class?__lt__ and it takes two parameters: self and other.def __lt__(self, other):. Other options have wrong names or missing parameters.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions