I am taking a DS class using Python where they asked the me to fix the next function. Since I am learning programming in Python parallel to take this class, I am kind of lost any help. Will be appreciated it!
split_title_and_name
people = ['Dr. Christopher Brooks', 'Dr. Kevyn Collins-Thompson', 'Dr. VG Vinod Vydiswaran', 'Dr. Daniel Romero']
def split_title_and_name(person):
return person.split()[0] + ' ' + person.split()[-1]
#option 1
for person in people:
print(split_title_and_name(person) == (lambda person:???))
#option 2
#list(map(split_title_and_name, people)) == list(map(???))