Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Party Invitations by mozurin
class Party:
def __init__(self, place):
self.place = place
self.friends = set()
def add_friend(self, friend):
self.friends.add(friend)
def del_friend(self, friend):
self.friends.remove(friend)
def send_invites(self, schedule):
for f in self.friends:
f.schedule = schedule
f.place = self.place
class Friend:
def __init__(self, name):
self.name = name
self.schedule = self.place = None
def show_invite(self):
return (
f'{self.place}: {self.schedule}' if self.place
else 'No party...'
)
July 3, 2018
Comments: