Challenge: Initials
Completed
Read a first name and a last name on one line, separated by a space, and print the initials in capitals, each followed by a full stop.
Input
One line: first name, a space, last name. The names may be in any case.
Output
The initials, e.g. mayur sarode → M.S.
Example
Input
mayur sarode
Output
M.S.
Editor
Python
Hints
split() breaks the line into two words.
word[0] is the first letter; .upper() makes it a capital.
Solution explanation
input().split() gives two words. Index [0] takes each first letter, upper() capitalises it, and an f-string adds the dots.
Show solution
first, last = input().split()
print(f"{first[0].upper()}.{last[0].upper()}.")