Question: in python please help, explanation would also help me understand, thanks 4. Write a function ion2e0 that takes a string as a parameter. If the

in python please help, explanation would also help me understand, thanks
4. Write a function ion2e0 that takes a string as a parameter. If the string ends with 'ion' it prints the initial part of the string (before the 'ion') followed by an 'e' with no extra spaces. If the string does not end with 'ion', including the circumstance in which the string contains 'ion' as a substring prior to the end, it prints the original string. You may assume that the string is in all lowercase. The following shows several examples of how the function would be used: Python 3.6.2 Shell Eile Edit Shel Debug Options Window Help >>> ion2e'congratulation') congratulate >one('hyperrational') hyperrational >>> ion2e 'marathon' marathon >>>ion2e'ionion') ione Ln: 51 Col: 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
