help me with this solution: I have to print dot-separated acronyms. For example "Very Important Person"= V.I.P The code that I wrote is as follows:
string=input()
str_list=string.split()
acronym=""
for word in str_list:
acronym+= word[0]+"."
print(acronym.upper())
The expected output is for "Very Important Person"= V.I.P, but I am getting V.I.P. So how can I stop python after it puts two dots? Any help will be much appreciated!
You could do it like this:
Output: