Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person:
- def __init__(self, name, lastname):
- self.name = name
- self.lastname = lastname
- def show_name(self):
- print("My name is " + str(self.name))
- def show_lastname(self):
- print("My lastname is " + str(self.lastname))
- obj = Person("Karter","Bishop")
- obj.show_name()
- obj.show_lastname()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement