Question: Write a function named split _ name that takes one parameter called name. If the name parameter value is a name in the form LastName,

Write a function named split_name that takes one parameter called name.
If the name parameter value is a name in the form LastName, FirstName
(e.g.,Grounds, Nic) then the function should return a list of two elements
where FirstName is the first element and LastName is the second element.
If the name parameter value is a name in the form FirstName LastName
(e.g., "Nic Grounds) then the function should return a list of two elements
where FirstName is the first element and LastName is the second element.

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 Programming Questions!