""" object.py a demo of an object (i.e. a class) in python $ python object.py Hello! My name is Robert Person('Robert') We did this in class on April 8. - Jim """ class Person: def __init__(self, name): self.name = name def __str__(self): # turn this object into a string # This turns Person('Sally') into "Person('Sally')" return f"Person('{self.name}')" def say_hello(self): print("Hello! My name is ", self.name) def main(): bob = Person('Robert') bob.say_hello() # is actually Person.say_hello(bob) # bob becomes self print(bob) main()