Day 4Name Initials

    Very easystringsloops

    Write initials(name) that returns the first letter of each word in name, in capitals, each followed by a dot.

    initials("ada lovelace") returns "A.L.".

    Examples

    Example 1
    >>> initials("ada lovelace")
    "A.L."
    Example 2
    >>> initials("Guido van Rossum")
    "G.V.R."

    Good to know

    • Names can have any number of words, separated by single spaces.

    Run examples checks the 2 examples above. Submit runs all 5 tests, including hidden edge cases, and marks the challenge solved.

    solution.py
    Loading Python…

    Test results show up here

    Write initials in the editor, then run the examples. Use print() freely: its output is shown for each test.