Mega Code Archive

 
Categories / Python / Class
 

Fill the fields of the record

class Employee:     pass john = Employee() # Create an empty employee record # Fill the fields of the record john.name = 'John Doe' john.dept = 'computer lab' john.salary = 1000