4 ms·
The Python 3.x print function and 2.x print statement automatically called the __str__ method on an object to get a representation to print to screen. The resul
by DrJosiah 12y ago
The Python 3.x print function and 2.x print statement automatically called the __str__ method on an object to get a representation to print to screen. The result is then sent to the appropriate file handle for actual printing (which can be overridden).