Removing Middle Names Using Unpacking

Complete the function below. It should remove any middle names (if present) and return only the first and last names.
Hint: Use unpacking with the * operator. You'll also need to split the name string into individual substrings.
def get_names(full_name):
# add your code here
return first_name, last_name print(get_names('John Smith')) # expected: ('John', 'Smith') print(get_names('Emily Catherine Brown')) # expected: ('Emily', 'Brown') print(get_names('Michael Andrew Thomas Lee')) # expected: ('Michael', 'Lee')
Python
Setting up Python environment...
Output