Hi everyone,
I struck with this code for few day , please help me and thanks in advance .
Write the class AddressBook so the following code works:
c = AddressBook()
c.add(name='ynon', email='ynon@ynonperek.com', likes='red')
c.add(name='bob', email='bob@gmail.com', likes='blue')
c.add(name='ynon', email='ynon@gmail.com', likes='blue')
c.find_by(name='ynon')
# returns:
# [
# {'name': 'ynon', 'email': 'ynon@ynonperek.com', 'likes': 'red'},
# {'name': 'ynon', 'email': 'ynon@gmail.com', 'likes': 'blue}
# ]
c.find_by(likes='blue)
# returns:
# [
# { 'name': 'bob', 'email': 'bob@gmail.com', 'likes': 'blue' },
# {'name': 'ynon', 'email': 'ynon@gmail.com', 'likes': 'blue'}
# ]