Computers and Technology, 20.02.2021 02:10 xcrysttallx
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
!
Answers: 1
Computers and Technology, 23.06.2019 07:00, Dvrsug8598
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
Computers and Technology, 23.06.2019 21:20, nathanfletcher
In microsoft word, when you highlight existing text you want to replace, you're in a. advanced mode. b. automatic mode. c. basic mode. d. typeover mode
Answers: 1
Words are way more edgy when you replace the letter i with an exclamation point!
Write the function...
Mathematics, 06.10.2020 07:01
Mathematics, 06.10.2020 07:01
History, 06.10.2020 07:01
Mathematics, 06.10.2020 07:01
Mathematics, 06.10.2020 07:01
Mathematics, 06.10.2020 07:01