Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
You'll need them if you want to create your own container types. Like if you want to do stuff with a bunch of values, but none of the built-in containers - like list, dict, set - does exactly what you want. Then you can design another container type. And you want to use it conveniently, using operators, +, * ir something, or indexing it with [ ]... In most cases magic methods allow you this: define what happens if you use a specific syntax.
21st Jul 2019, 10:29 AM
HonFu
HonFu - avatar
0
The tutorials are very brief and give only an overview which you're going to fill with more detail as you continue to learn. What exactly didn't you understand?
21st Jul 2019, 10:13 AM
HonFu
HonFu - avatar