Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Invoice:
- def __init__(self, client, total):
- self.client = client
- self.total = total
- def formatter(self):
- return f'{self.client} owes: ${self.total}'
- google = Invoice('Google', 100)
- snapchat = Invoice('SnapChat', 200)
- print(google.formatter())
- print(snapchat.formatter())
Add Comment
Please, Sign In to add comment