Skip to content

Commit c5f3a36

Browse files
committed
minor changes in acronym creator
1 parent cec7818 commit c5f3a36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Acronyms Creator/Acronyms Creator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Taking user input
22
user_input = input("Enter a phrase: ")
33

4-
# Spiliting the user input into individual words using split() method
5-
phrase = user_input.split()
4+
# Getting rid of 'of' word using replace() method & Spiliting the user input into individual words using split() method
5+
phrase = (user_input.replace('of', '')).split()
66

77
# Initializing an empty string to append the acronym
88
a = ""
@@ -11,4 +11,4 @@
1111
for word in phrase:
1212
a = a + word[0].upper()
1313

14-
print(a)
14+
print(f'Acronym of {user_input} is {a}')

0 commit comments

Comments
 (0)