Question: Data Programming / Python 1 Define last_letters up here! 2 3 def main(): last_letters('Ani, Trevor, Karen, Jasmine, Ryan') 5 last_letters Write a function named last_letters

Data Programming / Python
Data Programming / Python 1 Define last_letters up here! 2 3 def

1 Define last_letters up here! 2 3 def main(): last_letters('Ani, Trevor, Karen, Jasmine, Ryan') 5 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: nanes Ant. Trevor, Karen, Jasmine Hyan Last Letters(nanes) It should print 7 if __name__ '_main__': 8 main() 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

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!