Run
class Student: def __init__(self, name, age): self.name = name self.age = age # Create an object of type Student student1 = Student("Ram", 12) # Get attributes of the object as a dictionary attributes = vars(student1) print(attributes)
Output