We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cec7818 commit c5f3a36Copy full SHA for c5f3a36
Acronyms Creator/Acronyms Creator.py
@@ -1,8 +1,8 @@
1
# Taking user input
2
user_input = input("Enter a phrase: ")
3
4
-# Spiliting the user input into individual words using split() method
5
-phrase = user_input.split()
+# Getting rid of 'of' word using replace() method & Spiliting the user input into individual words using split() method
+phrase = (user_input.replace('of', '')).split()
6
7
# Initializing an empty string to append the acronym
8
a = ""
@@ -11,4 +11,4 @@
11
for word in phrase:
12
a = a + word[0].upper()
13
14
-print(a)
+print(f'Acronym of {user_input} is {a}')
0 commit comments