Answer to Question #224603 in Python for kaavya

Question #224603

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.

Explanation:

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




1
Expert's answer
2021-08-10T06:49:19-0400
result = ''
for w in input().split():
    result += w[0] + '.'
result = result[:-1]
print(result)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS