fork(5) download
  1. class Things:
  2. def __init__(self, n, t):
  3. self.namething = n
  4. self.total = t
  5. self.color = ""
  6.  
  7. th1 = Things("table", 5)
  8. th2 = Things("computer", 7)
  9.  
  10. print (th1.namething, th1.total)
  11. print (th2.namething, th2.total)
  12.  
  13. th1.color = "green"
  14.  
  15. print (th1.color)
  16. print (th2.color)
Success #stdin #stdout 0.01s 7896KB
stdin
Standard input is empty
stdout
('table', 5)
('computer', 7)
green