Why doesn't
import string;help(string.title)
seem to work but
help(string.strip)
works just fine?
I get the error
Traceback (most recent call last):
File "", line 1, in AttributeError: 'module' object has no attribute 'title'
title is a method on objects of type str, not a function in the string module. That means you can do "foo".title() or str.title("foo") but not string.title("foo").
help(str.title) seems to work just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With