Answers for "Fill in the gaps in the initials function so that it returns the initials of the words contained in the phrase received, in upper case."

0

Fill in the gaps in the initials function so that it returns the initials of the words contained in the phrase received, in upper case.

def get_initials(fullname):
  xs = (fullname)
  name_list = xs.split()

  initials = ""

  for name in name_list:  # go through each name
    initials += name[0].upper()  # append the initial

  return initials
Posted by: Guest on May-05-2020

Code answers related to "Fill in the gaps in the initials function so that it returns the initials of the words contained in the phrase received, in upper case."

Python Answers by Framework

Browse Popular Code Answers by Language