Question: Python Help with Lists - Swap names Complete the following function according to its docstring Note: this function should return None. Its job is to
Python Help with Lists - 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. 1 def swap_name (name_list: Listlstr 2 None: " ""name list contains a single person's name. Modify name_list so that the first name and last name are swapped >>>nameJohn', Smith' Swap name (name) >>> name 'Smith'Joh'] >>>nameJohn', Andrew', GleesonSmith'] 10 Swap name (name) >>> name 12 13 'Smith', Andrew', 'Gleeson', John']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
