""" Write a method to_initials that takes in a person's name string and returns a string representing their initials."""


def to_initials(name):
    value = []
    new_name = ""
    split_name = name.split(" ")
    i = 0

    while i < len(split_name):
        x = (split_name[i])[0]
        value.append(x)
        i = i+1
    new_name = "".join(map(str, value))
    return new_name

print(to_initials("Kelvin Bridges"))      # => "KB"
print(to_initials("Michaela Yamamoto"))   # => "MY"
print(to_initials("Mary La Grange"))      # => "MLG"
print(to_initials("pooja mehta"))


401f37cac0c169d0eeac241097659ad4db8c136a
<mask token>

<mask token>


def to_initials(name):
    value = []
    new_name = ''
    split_name = name.split(' ')
    i = 0
    while i < len(split_name):
        x = split_name[i][0]
        value.append(x)
        i = i + 1
    new_name = ''.join(map(str, value))
    return new_name


<mask token>

<mask token>


def to_initials(name):
    value = []
    new_name = ''
    split_name = name.split(' ')
    i = 0
    while i < len(split_name):
        x = split_name[i][0]
        value.append(x)
        i = i + 1
    new_name = ''.join(map(str, value))
    return new_name


print(to_initials('Kelvin Bridges'))
print(to_initials('Michaela Yamamoto'))
print(to_initials('Mary La Grange'))
print(to_initials('pooja mehta'))

""" Write a method to_initials that takes in a person's name string and returns a string representing their initials."""


def to_initials(name):
    value = []
    new_name = ""
    split_name = name.split(" ")
    i = 0

    while i < len(split_name):
        x = (split_name[i])[0]
        value.append(x)
        i = i+1
    new_name = "".join(map(str, value))
    return new_name

print(to_initials("Kelvin Bridges"))      # => "KB"
print(to_initials("Michaela Yamamoto"))   # => "MY"
print(to_initials("Mary La Grange"))      # => "MLG"
print(to_initials("pooja mehta"))

