Question: SWAP NAMES: complete the following function according to its docstring. Note : This function should return none. Its job is to modify the list as
1 Bef swap_name (name_list: List(str]) - None: "name 1ist contains a single person's name. Modify name_list so that the first name and last name are swapped. name 'John', 'Smith' 6 >swap_name (name) >>> name I'Smith', 'John'] >>> name = ['John', 'Andrew', 'Gleeson', 'Smith'] >swap_name (name) >>>name 10 I 'Smith', Andrew', 'Gleesont,John'] 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
