Question: Solution/output should be this using the given scaffold i r n e n Python / Data Programming last_letters Write a function named last_letters that takes

Solution/output should be this using the given scaffold
i
r
n
e
n
Solution/output should be this using the given scaffold i r n e
n Python / Data Programming last_letters Write a function named last_letters that
Python / Data Programming

last_letters Write a function named last_letters that takes a str as a parameter containing a sequence of names separated by commas, and prints the last letter of each name. For example, if we were to make the following call: names = 'Ani, Trevor, Karen, Jasmine, Ryan' last_letters (names) It should print: i r n e n You shouldn't make assumptions about the length of the given str or its composition. If the given str is empty, it should print nothing. If one of the names is empty (e.g., 'Ece, , Dylan'), it should print an empty line for the name with no characters. 1 # Define last_letters up here! 2. 3 def main(): 4 last_letters ('Ani, Trevor, Karen, Jasmine, Ryan') 5 6. 7 if __name __main__': 8 main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!