Acronyms:
You are given some abbreviations as input. Write a program to print the acronyms separated by a dot(.) of those abbreviations.
Input:
The first line of input contains space-separated strings.
Consider the given abbreviation,
Indian Administrative Service. We need to consider the first character in each of the words to get the acronym. We get the letter I from the first string Indian, we get the letter A from the second word Administrative, and we get the letter S from the third word Service. So, the final output should be I.A.S.
Sample Input 1:
Indian Administrative Service
Sample Output 1:
I.A.S
Sample Input 2:
Very Important Person
Sample Output 2:
V.I.P
result = ''
for w in input().split():
result += w[0] + '.'
result = result[:-1]
print(result)
Comments
Leave a comment