← Back to Strings
Question 21
Initials From Two Names
Initials From Two Names
Take the first character of each stored name and print the initials in the form <first initial>.<last initial>. (a dot after each letter) built with one f-string that indexes each name at position 0 and stores the result in initials. No input is read; the output is that one line.
Expected Output:
G.P.= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.