Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to view all attributes and methods of an object python

class Person:
    def __init__(self,name,age):
        self.name = name
        self.age = age
    def printInfo(self):
        print("name: {}, age: {}".format(self.name,self.age))

p1 = Person('Tom',24)
# right below
print(p1.__dict__)
Comment

PREVIOUS NEXT
Code Example
Python :: python filter dict 
Python :: ord python 
Python :: power function python 
Python :: how to define piecewise function i python 
Python :: downsample image opencv 
Python :: python negative indexing 
Python :: python concatenate lists 
Python :: django apiview pagination 
Python :: euclidean algorithm recursive python 
Python :: how to create a set from a list in python 
Python :: how to make dictionary in python 
Python :: spark to pandas 
Python :: django textfield 
Python :: find sum numbers in a list in python 
Python :: python get desktop environment 
Python :: input in python 
Python :: save turtle programming python 
Python :: python print format 
Python :: remove space from string python 
Python :: python extract list from string 
Python :: python planet list 
Python :: counter in python 
Python :: print random integers python 
Python :: split list on every nth element python 
Python :: Converting categorical feature in to numerical features 
Python :: Groups the DataFrame using the specified columns 
Python :: Creating a Pandas Data Frame Series 
Python :: screen.onkey python 
Python :: plot title overlapping yaxis python 
Python :: clone keras model 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =