Jan-18-2024, 10:59 AM
(Jan-18-2024, 06:48 AM)akbarza Wrote: how can I see all attributes and methods related to a special type? for example, I want to see all methods and attributes related to lists, how can I do it?
For that there is the documentation. However, Python's interactive interpreter has helpful feature as well:
>>> list. # press two times TAB list.append( list.clear( list.copy( list.count( list.extend( list.index( list.insert( list.mro() list.pop( list.remove( list.reverse( list.sort( >>> help(list.count) Help on method_descriptor: count(self, value, /) Return number of occurrences of value. # works on instances as well: >>> spam = [1, 2] >>> spam. # two times TAB spam.append( spam.clear() spam.copy() spam.count( spam.extend( spam.index( spam.insert( spam.pop( spam.remove( spam.reverse() spam.sort(
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.