Question: Swap names Complete the following function according to its docstring. Note: this function should return None. Its job is to modify the list passed as

Swap names Complete the following function according to its docstring. Note: this function should return None. Its job is to modify the list passed as its argument. 2 1def swap_name (name list: Liststr]->None: " " "name list contains a single person's name Modify name_list so that the first name and last name are swapped >name'John'Smith' swap name (name) Smith', 'John' swap name (name) > name >>> name= ['John', 'Andrew', 'Gleeson', 'smith'] 10 name 12 I'Smith', 'Andrew', 'Gleeson',John 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
