I've posted the code for the following question. What could be improved?
Q: Write a program that allows the user to type in a phrase and then outputs the acronym for that phrase.
Note: The acronym should be all uppercase, even if the words in the phrase are not capitalized.
def main(): ## input the phrase phrase = input("Enter the phrase: ") ## split the phrase into substrings phrase_split = phrase.split() acronym = "" ## iterate through every substring for i in phrase_split: acronym = acronym + i.upper() print("The acronym for your phrase is ",acronym + ".") main()