Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Employee:
- salary = 25000
- company_name= "ABC"
- employee = Employee()
- print('salary is:', getattr(employee,"salary"))
- print('salary is:', employee.salary)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement