method1 17. Special Method 1. Special Methods Special methods, also known as magic methods in Python, are methods that have names starting and ending with double underscores (__). These methods are automatically called by the Python interpreter when certain operators or built-in functions are used. init : This method is called when an object is created. It is used to initialize the object's attributes. str : This method i.. 2024. 3. 19. 이전 1 다음