How to update Object properties in Python?
class Employee: def __init__(self, salary, name): self.salary = salary self.name = name emp1 = Employee(10000, "John Doe") print(emp1.salary) emp1.salary = 20000 print(emp1.salary)
Sample output of above program.
10000 20000
2019-06-23T07:54:54+05:30
2019-06-23T07:54:54+05:30
Amit Arora
Amit Arora
Python Programming Tutorial
Python
Practical Solution