📜  python代码示例中的短名称

📅  最后修改于: 2022-03-11 14:47:13.426000             🧑  作者: Mango

代码示例2
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