← Quiz: Magic Methods and Properties: all 10 questions
Quiz: Magic Methods and Properties · Question 1 of 10
Which method does len(obj) call?
Which method does len(obj) call?
- A.obj.length()
- B.obj.size()
- C.obj.len()
- D.obj.count()
Answer & explanation
Correct answer: obj.len()
Built-in functions call the matching dunder method.
Can you get the rest right without peeking?
Take the timed Quiz: Magic Methods and Properties quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →