subject

Words are way more edgy when you replace the letter i with an exclamation point! Write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point. Your function should:

Convert the initial string to a list
Use a for loop to go through your list element by element
Whenever you see a lowercase i, replace it with an exclamation point in the list
Return the stringified version of the list when your for loop is finished
Here’s what an example run of your program might look like:

exclamations("I like music.")
# => I l!ke mus!c.
exclamations("Mississippi")
# => M!ss!ss!pp!

This is my code:
my_string = input("Enter text: ")
my_list = list(my_string)
for item in my_list:
if item == "i":
print ("!")
my_list. remove("i")
else:
print (item)
(" ").join(my_list)
it is not correctly printing:
it is suppose to be a string not up and down like this

Enter text: mississippi
m
!
s
!
s
!
p
!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What do the principles of notice, choice, onward transfer, and access closely apply to? a. privacyb. identificationc. retentiond. classification
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
You know the right answer?
Words are way more edgy when you replace the letter i with an exclamation point! Write the function...
Questions
question
Mathematics, 09.04.2021 09:10
question
English, 09.04.2021 09:10
question
Social Studies, 09.04.2021 09:10
question
Biology, 09.04.2021 09:10
question
Mathematics, 09.04.2021 09:10
Questions on the website: 13722361