/* Attributes starting with underscores are often considered private in Python for Dir() method, and this condition is used to filter out private attributes which starts with __(underscore).
text = Python
>>> print(dir(text))
Use the Dir() function to list all the methods and attributes of the python Object.
print(help(text.startswith)) -- It will tell how to use the String method.
text = Python
>>> for method in dir(text):
... if method.startswith("_") :
... continue
... print(method)
... if method.startswith("_") :
... continue
... print(method)
capitalize
casefold
center
count
casefold
center
count
No comments:
Post a Comment