3 ms·
In Python, str is a class. And all classes act as function. If there is ever any doubt, you can tell like this: >>> type(str) <type 'type'> You can
by j_baker 16y ago
In Python, str is a class. And all classes act as function. If there is ever any doubt, you can tell like this:
>>> type(str)
<type 'type'>
You can tell that str is a class because it inherits from type type.