re: Daily Challenge #38 - Middle Name VIEW POST

FULL DISCUSSION
 
def initialize(full_name):
    names = full_name.split()
    return ' '.join(
        f'{name[0]}.' if index > 0 and index < len(names) - 1 else name
        for index, name in enumerate(names)
    )
code of conduct - report abuse