Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update oop.py
Hello there,
its my first time doing something like this so sorry if i do something stupid.
Since Python 3.6 there is a new method called "f-String" that is smaler and much more readable.
  • Loading branch information
Rumdidum authored Aug 30, 2020
commit 5d96aba41d3bf6001fc12bd59924ac313ed7f477
4 changes: 2 additions & 2 deletions Object-Oriented/1-FirstClasses/oop.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ def __init__(self, first, last, pay):
self.last = last
self.email = first + '.' + last + '@email.com'
self.pay = pay

def fullname(self):
return '{} {}'.format(self.first, self.last)
return f"{self.first} {self.last}"

emp_1 = Employee('Corey', 'Schafer', 50000)
emp_2 = Employee('Test', 'Employee', 60000)